i have this code:
$('#categories').change(function() {
var myCars = new Array("Saab", "Volvo", "BMW");
addRowToTable(this.value, myCars);
$('#listings').hide();
});
but i dont want it to call the addRowToTable method if the user selects the first item because the first element says “Please select an item . . .”
Well, I’d think that using the selectedIndex property of your drop-down list should be enough:
You could, of course, get creative with jQuery selectors, but if your present need is just skipping the first item, I think this is the simplest possible solution.