How to retrieve title and other data attribute from protip instance?
See original GitHub issueHi, How to retrieve title and other data attributes from protip instance on protipshow event.
$('.protip').on('protipshow', function(ItemInstance){
console.log(ItemInstance.currentTarget.ptTitle, 'title'); //showing undefined
});
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
jQuery match data-attribute value of object within array of ...
I am trying to find an object in an array of data objects by matching the value of one of the attributes in...
Read more >Using data attributes - Learn web development | MDN
To get a data attribute through the dataset object, get the property by the part of the attribute name after data- (note that...
Read more >How to get the data attributes of an element using JavaScript
First, select the element which is having data attributes. ... Example 1: This example uses dataset property to get the data attributes of ......
Read more >A Complete Guide to Data Attributes | CSS-Tricks
Everything you ever wanted to know about data attributes in HTML, CSS, and JavaScript.
Read more >How to use Custom HTML5 Attributes in Thymeleaf
A quick guide to learning how to create HTML5 custom attributes using the Thymeleaf template engine.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think the docs need to be updated. The first parameter in the callback is the jQuery event object, the second is the item instance.
Closing the thread, let me know if you still have problems and I reopen it.
Thank you! it’s working.