Home Forums Archived Forums Weaver II Theme Weaver II Pro how to get jquery ui working

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18195
    Wasserwerk
    Participant

    Hello,
    this thread: http://forum-archive.weavertheme.com/discussion/5244/using-jquery-with-wp-and-weaver-ii
    told me, that jquery is already loaded by Weaver.

    Following this guide https://learn.jquery.com/jquery-ui/getting-started/
    I inserted in a page :
    <script type=”text/javascript”>
    $( “#date” ).datepicker();
    </script>
    <input type=”text” name=”date” id=”date”>

    but nothing happens. Anyway I tried putting
    <link rel=”stylesheet” href=”jquery-ui.min.css”>
    <script src=”external/jquery/jquery.js”></script>
    <script src=”jquery-ui.min.js”></script>
    in <HEAD> Section, having all files uploaded, but still no result.

    May you can give me a small running example how to make run a simple jQuery UI feature in Weaver ?
    Best regards, Uwe

    #24267
    scrambler
    Moderator
    Nor an expert but from my last experience with javascript in weaver, you need to use jQuery  instead of $.
    So try
    <script type=”text/javascript”>
    jQuery( “#date” ).datepicker();
    </script>
    <input type=”text” name=”date” id=”date”>
    Also make sur your content editor is in text mode AND that the page option “Allow Raw HTML and script” is checked
    #24268
    Weaver
    Keymaster

    WordPress loads jQuery without $ being defined as jQuery – this avoids issues with other scripts, but you then need to use jQuery explicitly. With the proper jQuery call to the script, you can use $’s inside the script, but you have to set it up that way.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘ Weaver II Pro’ is closed to new topics and replies.