On Friday 17 February 2006 12:04, Alex Duffield wrote:
> Does any one know how to register a window.onresize event using
> Behaviour.js
>
> I tryed
>
> var myrules = {
>       'window' : function(el){
>               el.onresize = function(){
>                       alert("Window Resized")
>               }
>       },
> }
>
> Behaviour.register(myrules);

why not juse use (requires prototype.js):
Event.observe(window, 'resize', function() { alert("Window Resized"); } );


you can toss that in the same script file.

since behaviour.js uses CSS selectors to identify elements, using 'window' as 
a selector will simply look for a <window> tag in your DOM, which probably 
doesn't exist.

-Jeremy

-- 
Jeremy Kitchen ++ [EMAIL PROTECTED]

In the beginning was The Word and The Word was Content-type: text/plain
  -- The Word of Bob.

Attachment: pgp1zpg0dsrbm.pgp
Description: PGP signature

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to