on click function problem (very basic i guess...)
Hello,
The problem can be seen here http://www.caae.cl/wordpress/category/accion-social
The idea is that when you click on "+ sobre esta área" box (which is a div classed as "moretext"), it increases the height of the container that has the class "text-container" (which is the parent).
But I can't get it to work, it triggers but then get back to the original state, and even changes some content on the site.
Tried also, instead of using "parent", using the direct class, but's the same thing.
This is the code i'm using:
- jQuery(function () {
jQuery('.moretext').click(function () {
jQuery(this).parent().stop(true).animate({height: '200px'},100);
}, function () {
jQuery(this).parent().stop(true).animate({height: '200px'},100);
});
});
Thanks for any help,