Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have this code in .html

XML
<tr data-index='{{index}}'>
         <td> {{firstName}} </td>
         <td>{{lastName}} </td>
         <td><button type=\"button\"   class=\"btn btn-info viewuser\">View User </button></td>
     </tr>



where i have to render a table each raw has customized parameter like
data-index=1
data-index=2

i need an article or tutorial to read more about custom parameter , and how to use them
Posted
Comments
ZurdoDev 11-Sep-15 14:08pm    
Since they are custom you can use them for whatever you want. I assume you mean custom attribute and not parameter? For example
< td myAttribute="test" anythingIWant="doesnnotMatter"> < /td>
May Bash 12-Sep-15 2:27am    
yes custom attribute!

1 solution

You can read about HTML5 data-* attributes more here:-

- jQuery.data() jQuery API Documentation[^]
- .data() jQuery API Documentation[^]

Hope it helps!
 
Share this answer
 
v2
Comments
May Bash 12-Sep-15 2:28am    
thank you so much
Palash Mondal_ 12-Sep-15 2:29am    
Glad it helped!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900