Check which element has been clicked with jQuery

前端 未结 7 672
天命终不由人
天命终不由人 2020-12-24 07:10

I am trying to use an \'if\' statement to determine which element was clicked.

Basically I am trying to code something along the lines of:

if (the el         


        
相关标签:
7条回答
  • 2020-12-24 07:51

    Hope this useful for you.

    $(document).click(function(e){
        if ($('#news_gallery').on('clicked')) {
            var article = $('#news-article .news-article');
        }  
    });
    
    0 讨论(0)
提交回复
热议问题