Hey, I looked back at Qaru and tried several other attempts at this, and I just couldn't get it to work.
I have a select element like this:
<select id="slct_firstCat" name="slct_firstCat" size="15">
</select>
This is displayed only after the completion of the specified AJAX request, therefore this selection element is NOT loaded by the DOM source page, it is loaded as a separate AJAX request after loading the main page.
I basically want to do this ...
if () {
} else {
}
But remember that this should work after the page has loaded. I can press the select button to launch the JS function, if necessary.
I tried this code below but couldn't get it to work:
if ($(".element1").length > 0 || $(".element2").length > 0 {
// code
}
So, if the select element exists, change the color of the tab to green, otherwise change it to red.
anon