jquery - Using attributes that don't belong (HTML) -


this question has answer here:

let's have table this:

<table> <tr> <td>my house </td> <td>my car </td> </tr> </table> 

and using jquery, if clicked on 1 of them, want show value of item. okay practice store additional information in attribute value example , fetch using .attr()

jquery has .data() applying data. there data-xxxx attribute storing data while keeping html valid. whatever method works better you!


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -