Return to Snippet

Revision: 49191
at July 18, 2011 04:34 by jbernus


Initial Code
var classes = $(".item").attr("className").split(" ");
for(var i = 0; i < classes.length; i++){
	if(classes[i].substr(0,3) == "id-"){
		var theId = parseInt(classes[i].split('id-')[1]);
	}
}

Initial URL
http://groups.google.com/group/jquery-en/browse_thread/thread/712929ba52f18775

Initial Description

                                

Initial Title
Get a part of a class name

Initial Tags
javascript, jquery

Initial Language
jQuery