Home Forums WoodMart support forum Add jquery library to woodmart!

Add jquery library to woodmart!

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #182380

    gorbunov1989
    Participant

    Hello! I’m trying to make a little FadeIn block for my site.

    Block structure:
    <i class=”fas fa-map-marker-alt”></i><span>Текущий город:</span> [wt_location get=’region’][/wt_location]
    <div id=”gorodmy” class=”popover bottom”>
    <div class=”arrow”></div>
    <h3 class=”popover-title”>Ваш регион [wt_location get=’region’][/wt_location]?</h3>
    <div class=”popover-content”>

    </div>
    </div>

    And i add little snippet to site.
    Snippet structure:
    $(document).ready(function(){

    $(“#hidePanel”).click(function(){
    $(“#gorodmy”).hide();
    });
    $(“#hidePanel2”).click(function(){
    $(“#gorodmy”).hide();
    });
    $(“#hidePanel1”).click(function(){
    $(“#gorodmy”).hide();
    });

    });

    I need to use Jquery library then it will works correctly

    BUT: when i added library my site has a problems with popup..
    How can i fixed it?

    Thanks a lot!

    #182384

    gorbunov1989
    Participant

    Maybe i can replace functions hide and fadeIn in Woodmart functions?

    #182449

    Hello,

    You do not need plug in JS as it has been already integrated in the WordPress core.

    Best Regards

    #182453

    gorbunov1989
    Participant

    unfortunately, it’s not working without jquery included(
    maybe i have some mistake on my code?

    #182473

    gorbunov1989
    Participant

    ` $(document).ready(function(){
    $(‘#gorodmy’).fadeIn(5000);
    });

    Where is mistake?
    Sory for this question)))

    #182487

    Hello,

    Please provide the screen of the Console if you have the errors, where do you put this code?

    Best Regards

    #182490

    gorbunov1989
    Participant

    I put in on snippet
    `add_action( ‘wp_head’, function () { ?>

    <script>
    $(document).ready(function(){
    $(‘#gorodmy’).fadeIn(5000);
    });

    </script>

    <?php } );

    Attachments:
    You must be logged in to view attached files.
    #182494

    gorbunov1989
    Participant

    Maybe i need to use CUSTOM JS on WOODMART?

    #182519

    gorbunov1989
    Participant

    Thanks guys! I found answer on your forum!
    Great work! Best guys!
    Made it like:
    `setTimeout(function() {
    var $showpopper = jQuery(‘#gorodmy’).fadeIn(5000);
    }, 10);

    #182524

    You are welcome! If you have any questions please feel free to contact us.

    Best Regards

Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Add jquery library to woodmart!’ is closed to new replies.