Solved: Prevent jQuery function if elementbyid clicked?
Posted: Sat Feb 23, 2008 9:05 pm
I like the following jQuery function...
However I don't want it to trigger if a visitor clicks on an h2 element with the id of 'searchh2'. I tried the following though it does not work...
Code: Select all
$("h2").click(function(){$(this).next('div').BlindToggleVertically(1000,null, 'bounceout');return true;})However I don't want it to trigger if a visitor clicks on an h2 element with the id of 'searchh2'. I tried the following though it does not work...
Code: Select all
if (!document.getElementById("searchh2")) {//script here}