Using html in jquery expand collapse -


i using expand collapse on site using jquery , html code bellow:

<script> $(document).ready(function () {     $('.fulltext').hide();      $('.blog-item .readmore').click(function (event) {         event.preventdefault();         $(this).parent().find('.fulltext').slidetoggle('slow');         $(this).text($(this).text() == 'close deals' ? 'more deals' : 'close deals');     }); }); </script> 

html:

<div class="blog-item">         <p class='fulltext'>read more text here.</p>     <a class="readmore" href="#">read more..</a> </div> 

actually want use table inside hidden text now: <p class='fulltext'>read more text here.</p>

but when use table inside fulltext stop working. please suggestion.

change <p class="fulltext"> <div class="fulltext"> , should work fine. can't have other block elements within <p>.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -