• shower1234

    (@shower1234)


    Hello

    I have a problem with jQuery(…).tabs is not a function . Everything was ok before i migrate wordpress to another server. I can’t see any widgets on admin page etc.

    I tried with jquery.noconflict but it didn’t help.

    Please help me.

Viewing 15 replies - 1 through 15 (of 18 total)
  • extensionly

    (@extensionly)

    If it worked then I would first check the paths to your javascript/css files. They might have changed during the move. Either domain name or the dir structure. But that is what the error seems to be . Missing js or css files

    Thread Starter shower1234

    (@shower1234)

    I checked it and paths are ok.

    Digico Paris

    (@digico-paris)

    Hi,

    Try to pull this like in js file, just to test Jquery calls:

    $(document).ready(function() {
      $('.title').append("<a href='#'>SAUSAGES</a>")
    }

    While title is any class in your template.

    It will probably make your website ugly, though,

    Thread Starter shower1234

    (@shower1234)

    Ok i will do it later because a lot of people read this website so i can’t test it now.

    Do i have to put it in the header.php in <script> tags?

    Digico Paris

    (@digico-paris)

    It’s the fastest way yes, to put in header.php inside standard javascript tags:

    <style type="text/javascript">
    $(document).ready(function() {
      $('.title').append("<a href='#'>SAUSAGES</a>")
    }
    </style>

    To work, TITLE must be an existing CSS class in your template. You can also try with h2 for example:

    <style type="text/javascript">
    $(document).ready(function() {
      $(h2).append("<a href='#'>SAUSAGES</a>")
    }
    </style>

    If Jquery works, it will add the text link sausages to that class everywhere – so maybe not a good idea if many people visit your site now.

    Thread Starter shower1234

    (@shower1234)

    Ok, i put the code inside and i saw in every h2 text SAUSAGES

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Just a note from someone passing through, doesn’t this:

    $(h2)

    need to be this:

    $('h2')

    ?

    Thread Starter shower1234

    (@shower1234)

    Yes, I did it, because I saw this problem in console so everything was alright.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    So $('.title') cannot be found?

    Thread Starter shower1234

    (@shower1234)

    No…

    I checked only:

    <script type="text/javascript">
    $(document).ready(function() {
      $('h2').append("<a href='#'>SAUSAGES</a>")
    }
    </script>

    And I saw near all h2 word SAUSAGES

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Oh sorry I got mixed up with sausages! You are trying to get jQuery tabs working but you are having issues, yeah? Can you show us a page with the problem?

    Thread Starter shower1234

    (@shower1234)

    It’s in wordpress admin page problem.

    I dont’s see any widgets because in console i have this error.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What’s the full errors you’re getting in the console? Including file names please ??

    Thread Starter shower1234

    (@shower1234)

    Uncaught TypeError: jQuery(…).tabs is not a function scripts.js?ver=1:31(anonymous function)

    In scripts.js it looks:

    // tab switcher
    	jQuery( "#tabs" ).tabs({
    	    activate: function (e, ui) {
    	        jQuery.cookie('selected-tab', ui.newTab.index(), { path: '/', expires: 1 });
    	    },
    	    active: jQuery.cookie('selected-tab')
    	});
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Does jQuery exist in your console after your page has loaded?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘jQuery(…).tabs is not a function’ is closed to new replies.