jquery get li data

The attr function is a member of the jQuery object, which means you need to call $() on this: $('li').click(function { alert($(this).attr('data-id')); }); Edit: As pointed out in the comments, this would probably be a better method yet: $(

相關軟體 Attribute Changer 下載

Attribute Changer是一個Windows檔案總管的功能補強程式,只要在檔案總管中選好目標,點下右鍵,就可以很方便的進行照片、檔案、資料夾的日期修改。 安裝後,在Windows檔案總管中按右鍵即可呼叫程式。 ...

了解更多 »

  • I'm using the jquery quicksand plugin. I need to get the data-id of the clicked item a...
    javascript - How to get the data-id attribute? - Stack ...
    https://stackoverflow.com
  • The attr function is a member of the jQuery object, which means you need to call $() on th...
    How to get the data value from a list item, using jquery, wh ...
    https://stackoverflow.com
  • The .data() method allows us to attach data of any type to DOM elements in a way that is s...
    .data() | jQuery API Documentation
    http://api.jquery.com
  • Return Values If no argument is passed to the .index() method, the return value is an inte...
    .index() | jQuery API Documentation
    https://api.jquery.com
  • ... { alert($(this).data('url')); }); Any idea how to get li url value when click ...
    Get li attribute using javascript or jquery - JavaScript - ...
    https://www.sitepoint.com
  • data selector Description: Selects elements which have data stored under the specified key...
    :data() Selector | jQuery UI API Documentation
    https://api.jqueryui.com
  • The data() method attaches data to, or gets data from, selected elements. Tip: To remove d...
    jQuery Misc data() Method - W3Schools Online Web Tutorials ...
    https://www.w3schools.com
  • Data attribute reference The jQuery Mobile framework uses HTML5 data-attributes to allow f...
    Data Attributes | jQuery Mobile API Documentation
    http://api.jquerymobile.com
  • jQuery Get/Post jQuery 杂项 jQuery noConflict() jQuery 实例 jQuery 实例 jQuery 测验 jQuery 参考手册 jQ...
    jQuery 数据 - jQuery.data() 方法 - w3school 在线教程 ...
    http://www.w3school.com.cn
  • 使用jQuery 來達到如iframe、asp include 和 php include 的效果。 而jQuery能做到的比iframe連結另一個網頁html內容來的活用 ......
    jQuery教學-jQuery Include HTML、插入html、jquery替代iframe ...
    http://ucmic.blogspot.tw