I’m parsing an html document with jQuery using $.ajax and I have the following problem, some divs have some uncommon attributes as you can see:
<div id='img' title='blabla' no='number' src='smthin'>content</div>
But the problem is that ajax only output:
<div id='img' title='blalba' src='smthin'>
The no attribute is skipped, how can I solve it ?
I’m parsing an html document with jQuery using $.ajax and I have the following
Share
you should use data- prefix for user-defined attributes in HTML tags. Try usind data-no instead of no attribute.