I don't know if this falls under bad practice or not, but time and
time again here on the group, people post code like yours where they
use an a tag to do something that has nothing to do with an a tag
If you don't want to go somewhere, why not just use a span or a
div and hang the click event
On Apr 15, 2009, at 6:50 AM, MorningZ wrote:
I don't know if this falls under bad practice or not, but time and
time again here on the group, people post code like yours where they
use an a tag to do something that has nothing to do with an a tag
If you don't want to go somewhere, why not
If you gave your buttons a common class you could do something like
this:
$(li.button a).click(function(event){
//show the link's parent, hide the parent's siblings
$(this)
.parent().show()
.siblings().hide();
return false;
});
On Apr 14, 11:49 pm, Dante danh...@gmail.com
That's exactly what I was looking for, Ricardo! Thank you.
I suspected the code could be simplified using parent/sibling
selectors; I was just unsure how to do so.
On Apr 15, 6:38 pm, Ricardo ricardob...@gmail.com wrote:
If you gave your buttons a common class you could do something like
4 matches
Mail list logo