Forums

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

Home Forums JavaScript click event

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

    Hello All,

    I Don’t want to fire this event above 768px resolution so please share the jquery script for it.

    $(document).ready(function(){
    $(‘#dropList’).click(function(event){

    ` event.stopPropagation();
    $(“.dropListMenu”).slideToggle();
    });

    $(“#dropList”).on(“click”, function (event) {
    event.stopPropagation();
    });
    `

    });

    $(document).on(“click”, function () {
    $(“.dropListMenu”).hide();
    });

    #250860
    Shikkediel
    Participant

    How about this?

    $('#dropList').click(function(event) {
    
      if ($(window).width() > 768) return false;
    
      event.stopPropagation();
      $('.dropListMenu').slideToggle();
    });
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.