geekisthenewsexy Posted October 27, 2010 Share Posted October 27, 2010 hi guys. okay first off, i don't know exactly if this is more on php or javascript. but if you think it's more on php then you can move this okay, so here goes. in my main page (index.php), i've included the file for the record (records.php) which means that the records are already shown. and along with the main page is this script: <script type="text/javascript"> animatedcollapse.addDiv('view', 'fade=1') animatedcollapse.ontoggle=function($, divobj, state){ //fires each time a DIV is expanded/contracted //$: Access to jQuery //divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID //state: "block" or "none", depending on state } animatedcollapse.init() </script> <div><a href="javascript:animatedcollapse.toggle('view')">View records </a> <a href="javascript:animatedcollapse.toggle('view')"><img src="images/toggle.png" alt="toggle" /> </a></div> <div id="view" class="faq-ans">The rest of the record goes here... </div> okay, my problem now is how to show only half of the records from the database so that the page won't get too crowded. and if i click "View records" the rest of the records should show up..kinda like toggled "view more.." in some sites.. i was thinking of posting some of the php code here but i think that would break the rules as this after all javascript section. anyway i hope you guys can me help on this.. Quote Link to comment https://forums.phpfreaks.com/topic/216963-how-to-put-the-rest-of-the-record-inside-a-toggle-div/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.