Topic Resolution: Resolved
  • Closed
  • David Self
    Spectator
    August 2, 2016 at 7:08 pm #29548

    i have two problems that i can’t seem to resolve.

    1) i have pages with javascript that worked before loading the theme. Now my js code is not finding jquery. I have the following src’s in my code that worked before but now i get a “Uncaught TypeError: Cannot read property ‘ajax’ of undefined” error. Src’s below:

    <script src=”https://code.jquery.com/jquery-1.11.3.min.js”></script&gt;
    <script src=”https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js”></script&gt;

    this is occuring on all of my pages that have js code. How do i resolve?

    2) on the same pages mentioned above i see a white box which appears to be the responsive menu. this may be an artifact of the above problem but if not how do i stop the responsive menu from appearing when not in the smaller screen sizes?

    David Self
    Spectator
    Posts: 18
    August 2, 2016 at 7:51 pm #29549

    To add a bit i am also getting these errors.

    Uncaught TypeError: jQuery(…).flexslider is not a function(anonymous function)
    Uncaught TypeError: $carousel(…).carousel is not a function(anonymous function)
    Uncaught TypeError: jQuery(…).ddslick is not a function

    Roman
    Spectator
    Posts: 3147
    August 2, 2016 at 9:48 pm #29551

    please provide URL to the website

    David Self
    Spectator
    Posts: 18
    August 2, 2016 at 11:02 pm #29553

    It is a localhost. No URL. To add to the last set of errors. I am specifying no slider on the pages that are getting these errors.

    David Self
    Spectator
    Posts: 18
    August 2, 2016 at 11:04 pm #29554

    I forgot to mention that i resolved issue 1 on the first post by adding the latest jquery src’s but still have the other issues. Thanks for your reply by the way.

    Denzel Chia
    Moderator
    Posts: 2656
    August 3, 2016 at 1:26 am #29560

    Hi,

    In WordPress, you cannot add your own jQuery file link.
    You cannot add the following into your website.



    It will break theme and other third party plugin scripts.

    You need to use function wp_enqueue_script https://developer.wordpress.org/reference/functions/wp_enqueue_script/ to load your javascript files.

    You need to use WordPress included jQuery and jQuery ui.
    You have to write your jQuery in no-conflict using jQuery instead of $

    Our support does not include custom coding assistance.
    You can contact our developer for customization service, if you require further assistance on this issue.
    https://theme4press.com/theme-customization-service/

    Thank you.

    David Self
    Spectator
    Posts: 18
    August 3, 2016 at 5:35 pm #29583

    Thanks. I have sorted the issue out.

    Denzel Chia
    Moderator
    Posts: 2656
    August 4, 2016 at 1:14 am #29589

    You are welcome.
    Thank you