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 ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org
In the beginning was The Word and The Word was Content-type: text/plain
-- The Word of Bob.
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs