Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End !window.jQuery.ui Problem in WordPress

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #39745
    mevaser
    Participant

    I am working on a WordPress website, and I need to include this to a page. BUT there is this code that does not let me integrate it.

    <script>!window.jQuery && document.write(unescape(‘%3Cscript src="js/jquery-1.7.2.min.js"%3E%3C/script%3E’))</script>

    Any idea how to make it work in WordPress?

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script&gt;

    <script>!window.jQuery && document.write(unescape(‘%3Cscript src="js/jquery-1.7.2.min.js"%3E%3C/script%3E’))</script>

    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script&gt;

    <script>!window.jQuery.ui && document.write(unescape(‘%3Cscript src="js/jquery-ui-1.8.21.custom.min.js"%3E%3C/script%3E’))</script>

    <script src="js/jquery.mousewheel.min.js"></script>

    <script src="js/jquery.mCustomScrollbar.js"></script>

    <script src="js/scrollbar.js"></script>

    Thanks,

    #114007
    JohnMotylJr
    Participant

    Have you tried any of these options? **remove the spaces from my script tags**

    < script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" >< /script >
    < script >window.jQuery || document.write("

    or use javascript...

    (function test_jQuery() {
    if (!window.jQuery) {
    var script = document.createElement('script');
    script.src = "js/jquery.js";
    document.getElementsByTagName('head')[0].appendChild(script);
    }
    if (!window.jQuery.ui) {
    var script_ui = document.createElement('script');
    script_ui.src = "js/jquery-ui.js";
    document.getElementsByTagName('head')[0].appendChild(script_ui);
    }
    })();

    You dont need the anonymous function, its just habit for me.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.