// toggle hide/show of an element $(“#DivID”).toggle(1000); // do something when animation is complete $(“#DivID”).toggle(1000, function () { alert(“Toggle Complete”); }); // hide an element $(“#DivID”).hide(1000); // do something when animation is complete $(“#DivID”).hide(1000, function () { alert(“Hide Complete”); }); // show an element $(“#DivID”).show(1000); // do something when animation is complete $(“#DivID”).show(1000, function () […]
Category: jQuery
Common Selectors
// get element by id $(“#ElementID”).whatever(); // get element by css class $(“.ClassName”).whatever(); // get elements where id contains a string $(“[id*=’value’]”).whatever(); // get elements where id starts with a string $(“[id^=’value’]”).whatever(); // get elements where id ends with a string $(“[id$=’value’]”).whatever(); // get all elements of certain type (can use “p”, “a”, “div” – […]