Forums

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

Home Forums JavaScript Expandable/Collapsable not working Reply To: Expandable/Collapsable not working

#155732
fobsternd
Participant

So here is what I did, I used the CDN for the library and included this in my script tags, here is my actual code:

$(‘.profile’).hover(function() { $(this).parent().toggleClass(‘hover’); });
$(‘.profile’).click(function() {
if ($(this).height() > 150) {
$(this).animate({height: ‘120px’});
} else {
$(this).animate({height: ‘400px’});
}

});

Now this is technically supposed to work right? I put it in Dreamweaver and previewed the page on a browser but still not working :(