February 12, 200917 yr Here is my code: The Sortable function doesn't seem to work at all. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Admin Control Panel</title> <link rel="stylesheet" type="text/css" media="all" href="css/resetText.css" /> <link rel="stylesheet" type="text/css" href="css/grids-min.css"> <link rel="stylesheet" type="text/css" href="css/style.css" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery-ui-personalized-1.6rc6.min.js"></script> <script> $(document).ready(function() { $('.mylist2').hide(); $('#settingBox').hide(); $('.closeArea').bind('click', toggleContent); }); </script> </head> <body> <div id="header"></div> <div id="doc3" class="yui-t1"> <div id="yui-main"> <div class="yui-b rightCon"> <div id="settingBox"> </div> <p class="settingShow" onclick="java script: $('#settingBox').slideToggle('fast');">Display Settings</p> <div style="clear:both;"></div> <div id="moduleCon"> <div id="moduleLef" class="column"> <div class="widget"> <div class="widget-head">Latest Updates<div class="closeArea"></div></div> <div class="widget-content"> This is some sample content. </div> </div> <div class="widget"> <div class="widget-head">Latest Updates<div class="closeArea"></div></div> <div class="widget-content"> This is some sample content. </div> </div> </div> <div id="moduleRig" class="column"> <div class="widget"> <div class="widget-head">Latest Updates<div class="closeArea"></div></div> <div class="widget-content"> This is some sample content. </div> </div> <div class="widget"> <div class="widget-head">Latest Updates<div class="closeArea"></div></div> <div class="widget-content"> This is some sample content. </div> </div> </div> </div> </div> </div> <div class="yui-b leftCon"> <div id="menuCon"> <div class="menu"> <h3 onclick="java script: $('.mylist').slideToggle('slow');"><p style="margin-top: 5px;">Settings</p></h3> <ul class="mylist" > <li><a href="#">my sample link #1</a></li> <li><a href="#">my sample link #2</a></li> <li class="bottomMI"><a href="#">my sample link #3</a></li> </ul> </div> <div class="menu"> <h3 onclick="java script: $('.mylist2').slideToggle('slow');"><p style="margin-top: 5px;">Settings</p></h3> <ul class="mylist2" > <li><a href="#">my sample link #1</a></li> <li><a href="#">my sample link #2</a></li> <li class="bottomMI"><a href="#">my sample link #3</a></li> </ul> </div> <div class="menu"> <h3 onclick="java script: $('.mylist3').slideToggle('slow');"><p style="margin-top: 5px;">Settings</p></h3> <ul class="mylist3" > <li><a href="#">my sample link #1</a></li> <li><a href="#">my sample link #2</a></li> <li class="bottomMI"><a href="#">my sample link #3</a></li> </ul> </div> </div> </div> </div> </div> <div style="clear:both;"></div> <div id="footer"> </div> </body> <script type="text/javascript"> function () { $('.column').Sortable( { accept: 'div.widget', helperclass: 'sortHelper', handle: '.widget-head', fx:300, tolerance: 'pointer' } ); } var toggleContent = function(e) { var targetContent = $('div.widget-content', this.parentNode.parentNode); if (targetContent.css('display') == 'none') { targetContent.show(); } else { targetContent.hide(); } return false; }; </script> </html> Any help would be gr8 Thanks.
February 12, 200917 yr Not familiar with jquery but have you tried putting the scripts at the top of the page (inside the head tags) instead of at the bottom?
February 12, 200917 yr Author Nope, still not working when I move it, And I placed the JS code there for it to load the page first, then make the modules movable
February 13, 200917 yr Author Did you try it inside the $(document).ready(function() {}) I did that, but it never worked so then I changed the Sortable to sortable, seemed to work fine now, thanks
Create an account or sign in to comment