Čawte viete mi niekto vysvetlit tento script?..čo to robi pekne poporiadku
Kód:
$(body).click(function(e){
if ($(e.target).is('[class*=counter]')){
rulesParsing = $(e.target).attr('class');
rulesRegExp = /\[(.*)\]/;
getRules = rulesRegExp.exec(rulesParsing);
str = getRules[1];
pattern = /\[|,|\]/;
result= str.split(pattern);
alert(result);
}
});