Working with HTML Fragments in jQuery

added by MikeMore
8/11/2011 8:52:23 PM

153 Views

When you are working in jQuery with generated HTML fragments that are returned from AJAX, It is interesting to note these cases..


1 comments

dpeterson
8/11/2011 7:12:50 PM
I would add that rather than using an attribute like tempsrc, to use the HTML5 "data" attributes http://ejohn.org/blog/html-5-data-attributes/.
So the example then becomes data-src.
Essentially, since you're going to be using a non-standard attribute anyway, why not use one that would validate in an HTML5 compatible browser?