I see two potential problems: - the "e" argument to your mouseover handlers hide() & show() is an event object.
-you need to pass a function as the 3rd argument to connect() but you're passing the results of show() & hide() -bg .M. wrote: > Hi, could someone help me sort this out. I'm going round in circles. > I've got two classes, popup and invisible defined in a css file > attached to my page. I've managed to connect to show/hide functions > that have the desired element hard-coded. Now I'm trying to work out > how to make the two functions generic so I can connect up a whole bunch > of elements. > > The following gives "obj has no properties" in the first line of the > show function. Help! What am I doing wrong? Can't find any useful doco > on this with samples. > > Thanks > .M. > > initTooltips = function(sources,mods){ > > show = function(e){ > setElementClass(e, 'popup'); > } > hide = function(e){ > setElementClass(e, 'invisible'); > } > connect('source_1', 'onmouseover', show('source_popup_1')); > connect('source_1', 'onmouseout',hide('source_popup_1')); > connect('source_popup_1', 'onmouseover', show('source_popup_1')); > connect('source_popup_1', 'onmouseout', hide('source_popup_1') ); > > > } > > connect(window, "onload", initTooltips(5,0) ); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~----------~----~----~----~------~----~------~--~---