javascript - jQuery collapse bootsstrap and jQuery slide -
i have page 4 rows , 2 cols, in each of rows bootstrap accordion , image in other column. when header clicked accordion opens(bootstrap collapse) , hidden div images shown under image visible (slide jquery).
so 1 click 2 divs open(accordion body+hidden div), works 4 accordions when use different ids accordions, stay open.
when use same id accordions closing accordion body have problems.
the jquery slide needs noconflict , click function(the onclick isn't way go read somewhere) , else statement.
what want doesn't matter header click, clicked accordion opens + hidden div images shown.
is there out there.....who can help.
function slide(slides) { $('.slidepic').each(function(index) { if ($(this).attr("id") == slides) { $(this).slidedown(200); } else { $(this).slideup(200); } }); }
a 2 row version of page here: http://jsfiddle.net/supmn/1/
try this:
means, got click jquery click-event-handler. don't use javascript: uglyfunction()
$('.accordion-heading').click(function (){ $('.slidepic').each(function (index) { if ($(this).attr("id") == slides) { $(this).slidedown(200); } else { $(this).slideup(200); } }); }); }
Comments
Post a Comment