How to get the data-id attribute?

后端 未结 15 2451
青春惊慌失措
青春惊慌失措 2020-11-21 23:29

I\'m using the jQuery quicksand plugin. I need to get the data-id of the clicked item and pass it to a webservice. How do I get the data-id attribute? I\'m using the .

15条回答
  •  天涯浪人
    2020-11-21 23:56

    I have a span. I want to take the value of attribute data-txt-lang, which is used defined.

    $(document).ready(function ()
    {
    EN
    alert($('.txt-lang-btn').attr('data-txt-lang'));
    });
    

提交回复
热议问题