/*
Behaviour v1.1 by Ben Nolan, June 2005. Based largely on the work
of Simon Willison (see comments by Simon below).
-
+ Small fixes by J.Dobrowolski for Front Accounting May 2008
Description:
Uses css selectors to apply javascript behaviours to enable
apply : function(){
for (h=0;sheet=Behaviour.list[h];h++){
for (selector in sheet){
- list = document.getElementsBySelector(selector);
+ var sels = selector.split(',');
+ for (var n = 0; n < sels.length; n++) {
+ list = document.getElementsBySelector(sels[n]);
- if (!list){
+ if (!list){
continue;
- }
+ }
- for (i=0;element=list[i];i++){
+ for (i=0;element=list[i];i++){
sheet[selector](element);
+ }
}
}
}