Tuesday, 15 February 2011

jquery - slideToggle not working -



jquery - slideToggle not working -

slidetoggle not working reason @ site. main problem not sliding down, when click 'show' button, instead shows content right away. slides hide content pressing 'hide' button. here javascript. knows issue here?

$(document).ready(function(e) { $('.newsfull').hide(); $('.switch').click(function(e) { $(this).parent().children('.switch').toggle(); var text = $(this).parent().children('.newsfull'); text.slidetoggle(); });

});

here link http://jsfiddle.net/zxf9j/

simply add

.newsfull {display:inline-block;}

to css

check fiddle

jquery slidetoggle

No comments:

Post a Comment