The solution by WoolyNinja works great, with a change of the line:
$("div[id^='showhide_']").click(function(){
to:
$("img[id^='showhide_']").click(function(){
as it is the image that I wanted to capture the click event for.
It could not be done by show/hide classes in a simple way as there
will
Since you're already using css to show/hide, then why not apply a class
to the shown/hidden rows, and select on that instead?
Thus, for hidden rows apply the class "hide_row", which will include the
css required to hide the row, and apply "show_row" on those rows you
want displayed.
~ ~ D
I would use the [attribute^=value] selector. Then use substring to
get the EngineerShortName.
$("div[id^='showhide_']").click(function(){
if(this.id&&this.id.length>0){
var engName=this.id.substring('showhide_'.length);
$("div#block_"+engName+" > div").toggle();
}
});
On
3 matches
Mail list logo