hawkagent Posted November 5, 2010 Share Posted November 5, 2010 Hello I'm using anchor navigating on my website, the code for that looks like this (I include http://jqueryjs.googlecode.com/files/jquery-1.2.6.pack.js for this): //On load page, init the timer which check if the there are anchor changes each 300 ms $().ready(function(){ setInterval("checkAnchor()", 300); }); var currentAnchor = null; //Function which chek if there are anchor changes, if there are, sends the ajax petition function checkAnchor(){ //Check if it has changes if(currentAnchor != document.location.hash){ currentAnchor = document.location.hash; //if there is not anchor, the loads the default section if(!currentAnchor) query = "section=home"; else { //Creates the string callback. This converts the url URL/#main&id=2 in URL/?section=main&id=2 var splits = currentAnchor.substring(1).split('&'); //Get the section var section = splits[0]; delete splits[0]; //Create the params string var params = splits.join('&'); var query = "section=" + section + params; } //Send the petition $.get("page_callback.php",query, function(data){ $("#content").html(data); }); } } This works perfectly for me. Next whenever I include mootools 1.2, I get an error on running the script on: "Object doesn't support this property or method." on line 27 char 1, which is the following line $.get("page_callback.php",query, function(data){ This error only happens when I include mootools scripts, I dont even have to use any mootools functions. My goal is making Form.send (from the mootools demo, where I got my mootools.js from) work with my anchor navigating script. I'm a beginner in js and any help is appreciated!! Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/217884-get-problem-with-mootools/ Share on other sites More sharing options...
hawkagent Posted November 5, 2010 Author Share Posted November 5, 2010 I just realised i posted this on the wrong forum, my apologies for this. Can anyone move this to the Javascript forum? Seems like i can't delete my post. :s Thank you Quote Link to comment https://forums.phpfreaks.com/topic/217884-get-problem-with-mootools/#findComment-1130858 Share on other sites More sharing options...
RichardRotterdam Posted November 7, 2010 Share Posted November 7, 2010 I suggest you stick with one framework since Mootools and jQuery conflict with each other. Rewritting the jQuery dependant code to mootools shouldn't be too hard, what exactly does it do? Quote Link to comment https://forums.phpfreaks.com/topic/217884-get-problem-with-mootools/#findComment-1131349 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.