02-03-2010, 05:27 AM
|
#1 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
Class names and reducing onclick events...
One day I'll finally find the time to sit down and learn AJAX, but until I do...
Long story short:
javascript Code:
$('.'+howDoIgetThis+'_parent').click(function(){ $('.'+andPutItHere+'_child').toggle(); });
So that an element with the class 'a_parent' opens 'a_child', and 'b_parent' opens 'b_child' etc.
|
|
|
|