Ticket #5967: NodeList.patch

File NodeList.patch, 0.7 kB (added by guest, 11 months ago)
  • NodeList.js

     
    241241                        return this; 
    242242                }, 
    243243 
    244                 // FIXME: toggleClass()? connectPublisher()? connectRunOnce()? 
     244                toggleClass: function(/*String*/ className, /*Boolean?*/ condition){ 
     245                        // summary: 
     246                        //             toggles the specified class in every node in the list 
     247                        // 
     248                        this.forEach(function(i){ dojo.toggleClass(i, className, condition); }); 
     249                        return this; 
     250                }, 
    245251 
     252 
     253                // FIXME: connectPublisher()? connectRunOnce()? 
     254 
    246255                place: function(/*String||Node*/ queryOrNode, /*String*/ position){ 
    247256                        //      summary: 
    248257                        //              places elements of this node list relative to the first element matched