I have the following code:
$('#smallcart .plusone').live('click',function(){
var id = $(this).attr('id');
articlenr = id.split('_')[1];
});
this works fine in FF, safari, Chrome, however in IE (7 and 8) it throws an error on the split-function (this property or method is not supported by this object).
if I alert the ‘id’-variable I get something like plus_5751. (so I want to get the ‘5751’ part)
if I do alert(typeof(id)) I get String as an answer…
Maybe somebody can point me to the right answer?
Thx
The
splitworks pretty well in IE. The problem is the part left of the equal-sign. It’s an object with all input-fields having the namearticlenrand therefor IE quits with ‘this property or method is not supported by this object’ when you’re trying to assign a string to it.