/ Published in: jQuery
When the anchor tag is clicked, load the ul#movies from new_file.html, and append to the div#container inside a div#info, changing the DOM, but only the first time clicked. Each subsequent time, toggle the show/hide status.
Modified version of code from Jeffrey Way's jQuery for Absolute Beginners: Day 10 on ThemeForest.
Expand |
Embed | Plain Text
$('a').one('click', function() { $('<div id="info" />').load('new_file.html ul#movies', function() { $(this).hide().appendTo('div#container').slideDown(1000); }); }); $('a').click(function() { $('div#info').toggle(1000); });
You need to login to post a comment.
