02-04-2010, 01:23 AM
|
#4 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
Forgive my ignorance, but since that's a function, wouldn't I still have to implement it in an onclick event? The reason I ask is because the current function I use looks like this;
javascript Code:
function toggle_display(id){ jQuery('.'+id+'_child').toggle(); }
...and works via the following (shown in its php form);
php Code:
'<a href="#' . $label . '_target" id="' . $label . '_parent" onclick="toggle_display(\'' . $label . '\'); click_parent(this);">'
The solution I'm hoping for would allow me to remove the onclick attribute completely, reducing the amount of html generated. This is part of a WordPress plugin that generates long lists of MLS listing results, so every byte I reduce in the generation, the quicker things will load.
|
|
|
|