Author: andre Date: 2010-03-22 12:21:05 +0100 (Mon, 22 Mar 2010) New Revision: 41555
Modified: openimages/trunk/src/main/webapp/oiplayer/js/jquery.oiplayer.js Log: seems to fix some issues with browsers reporting undefined errors when the tag had no extra classes Modified: openimages/trunk/src/main/webapp/oiplayer/js/jquery.oiplayer.js =================================================================== --- openimages/trunk/src/main/webapp/oiplayer/js/jquery.oiplayer.js 2010-03-22 10:31:04 UTC (rev 41554) +++ openimages/trunk/src/main/webapp/oiplayer/js/jquery.oiplayer.js 2010-03-22 11:21:05 UTC (rev 41555) @@ -425,13 +425,15 @@ */ function extraAttributes(el) { var attributes = new Object(); - var classes = $(el).attr("class").split(' '); - for (var i in classes) { - var cl = classes[i]; - if (cl.indexOf("oip_ea_") == -1) continue; - var a = cl.substring("oip_ea_".length); - var v = a.indexOf("_"); - attributes[a.substring(0, v)] = a.substring(v + 1); + if ($(el).attr("class")) { + var classes = $(el).attr("class").split(' '); + for (var i in classes) { + var cl = classes[i]; + if (cl.indexOf("oip_ea_") == -1) continue; + var a = cl.substring("oip_ea_".length); + var v = a.indexOf("_"); + attributes[a.substring(0, v)] = a.substring(v + 1); + } } return attributes; } _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs