We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13736
    • 345 Posts
    I inserted jQuery into a sites home page and whenever I log into the manager Quickedit screws up for that particular page, (just the home page). It looks like the QuickEdit headers don’t get inserted. Any ideas why.

    The jQuery call goes something like this...

    <script type="text/javascript" src="assets/js/jquery.js"></script>
    
    <script type="text/javascript">
    	$(document).ready(function(){
    		$(".panel-right:not(:first)").hide();
     		$("#tutorial-nav a").click(function(){
    			$(".panel-right:visible").hide();
    			$("#tutorial-nav a").removeClass("here");
    			$(this).addClass("here");
    			$(this).next().show();
    			return false;
    		});
    	});
    </script>


      • 30765
      • 66 Posts
      Quote from: jbjones at Mar 20, 2008, 06:33 PM

      I inserted jQuery into a sites home page and whenever I log into the manager Quickedit screws up for that particular page, (just the home page). It looks like the QuickEdit headers don’t get inserted. Any ideas why.

      QuickEdit uses Mootools, which grabs the $ variable that jQuery uses. There’s an easy workaround to get jQuery to use a different base variable, something like:

      var $j = jQuery.noConflict();


      Then in your code replace $ with $j.

      Cheers
      Matt

        • 6726
        • 7,075 Posts
        Yes that should solve it and it’s one of the key features of jQuery IMHO... I constantly use the noconflict() even when I don’t have other scripts running... just to be future proof in case I need to use several js frameworks or other scripts...
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l&#39;outil id
          • 13736
          • 345 Posts
          Ok. I tried that and it didn’t work. jQuery still works so I assume the change is correct, but no Quick Edit.

          <script type="text/javascript" src="assets/js/jquery.js"></script>
          
          <script type="text/javascript">
                  var $j = jQuery.noConflict();
          	$j(document).ready(function(){
          		$j(".panel-right:not(:first)").hide();
           		$j("#tutorial-nav a").click(function(){
          			$j(".panel-right:visible").hide();
          			$j("#tutorial-nav a").removeClass("here");
          			$j(this).addClass("here");
          			$j(this).next().show();
          			return false;
          		});
          	});
          </script>



          By the way the QuickEdit toolbar inside the body is inserted (raw text with no styling), I’m just not getting the Script inserts in the header.

          http://test.applicantprofile.com

            • 30765
            • 66 Posts
            Quote from: jbjones at Mar 21, 2008, 01:18 PM

            What you’ve done looks right. However, your page seems to be missing a closing <head> tag, which is what QuickEdit looks for to insert the headers.

            Cheers
            Matt
              • 13736
              • 345 Posts
              A missing Head tag. That was it.

              Don’t you just hate it when you miss something obvious like that. I’ve been trying to figure it out (off-and-on) for weeks.

              Thanks for the help.