Hi list...
This is my very first jQuery project, so it should be an easy question. I can't seem to get fadeToggle to work.
A span.toggler, when clicked, hides itself, and then makes visible a div.commentary that contains a div.closer. When the div.closer is clicked, it hides its parent div.commentary, but fails to make the span.toggler visible again.
thanks,
- Michael M.
$('.closer').click(
function(){
var commentary = $(this).parent();
commentary.slideToggle();
var _id = commentary.attr("id");
var commentButton = String(_id.substr(0, _id.length-1) + "a");
$(commentButton).fadeToggle();
}
);
$('span.toggler').click(
function(){
// toggles items (span.toggler and div.commentary)with corresponding ids. ex: _1a and _1b, etc.
$(this).fadeToggle();
var targ = String("#" + this.id.substr(0, this.id.length-1) + "b");
$(targ).slideToggle();
}
);