lundi 30 mars 2015

Using several operators in a jquery if statement

I'm trying to pull out specific xml nodes if they match a set of criteria.


I'm looking to write an if statement that queries:



  • if the xml series node text is equal to the current value of the seriesAlpha array and the xml issue number node text is equal to the current value of the issueOrder array and the xml special edition node is empty


-OR-



  • if the xml series node text is equal to the current value of the seriesAlpha array and the xml edition name node text is equal to the current value of the issueOrder array.


My current code is as follows:



if($(this).find('series').text() == seriesAlpha[i] && $(this).find('number').text() == issueOrder[j] || $(this).find('edName').text() == issueOrder[j])


I don't know how to add in the check to see if the special edition node is empty, or if it's even possible to have that level of specificity.


Aucun commentaire:

Enregistrer un commentaire