[jQuery] Re: Call object method onclick

2009-01-08 Thread fatslags2...@gmail.com
Thanks for the solution, works great. On Jan 4, 7:02 pm, Balazs Endresz balazs.endr...@gmail.com wrote: Hmm, I don't think you should do this: Viewer = new Viewer; this will overwrite your class and you can't instantiate it again! rather:     initialize: function()     {         var

[jQuery] Re: Call object method onclick

2009-01-04 Thread Alexandre Plennevaux
this worked for me: http://jsbin.com/utahi On Sun, Jan 4, 2009 at 5:31 PM, fatslags2...@gmail.com fatslags2...@googlemail.com wrote: function Viewer() { }; Viewer.prototype.constructor = Viewer; Viewer.prototype = { getFullAreaId: function() { return this._fullAreaId; },

[jQuery] Re: Call object method onclick

2009-01-04 Thread Balazs Endresz
Hmm, I don't think you should do this: Viewer = new Viewer; this will overwrite your class and you can't instantiate it again! rather: initialize: function() { var self=this; $(#thumbs img:first).click(function(){ self.doX() }); }, or