The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Jquery expand Re: Jquery expand


@wragen22 Ah, ok. I did miss the `hide()` at the beginning, so that’s why the toggle was off. I changed it to `slideDown` and `slideUp` to make it more concise. I also ended up changing around the css a tiny bit. The number was there, it was just white. And the buy button span was the same color as the background. Anyway, [try it now](!


$(‘.grid p, .grid .right-module’).hide();
$(‘.grid h1’).addClass(‘pointer’).click(function() {
var $article = $(this).closest(“.grid”),
$siblings = $article.find(“p,.right-module”)
if (!$article.hasClass(‘expanded’)) {
$siblings.slideDown(‘slow’, function() {
} else {