daily pastebin goal
13%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function observeSelect(reg){
  2.   $$(reg+' select.get').each(function(element){
  3.     // prüft, ob es evtl. schon observed wurde.... (muss aber nicht)
  4.     if(!element.observingChange){
  5.       element.observe('change', function(event){
  6.          el = event.element();
  7.      // do something
  8.       });
  9.       element.observingChange = true;
  10.     };
  11.   });
  12. }
  13.  
  14. document.observe("dom:loaded", function(){
  15.   observeSelect('#filter')  // observed alle filter selects
  16. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top