[jQuery] Plug in variables getting to grips

[jQuery] Plug in variables getting to grips


I have the following within a plug in that i am trying to create.
Now all works well but i thought that th enext stage to take my plug
in would be to let me set the varaibels when I call the plug in.
i have th efollowing say:
var $listContainer = $
('div.listContainer'),
        $container = $('div.calendarContainer'),
        Speed =5,
        mouseWheel=true,
        heigthOful = $container.find('div.listContainer ul').height(),
        Time = parseInt(heigthOful)*Speed;
No wi have tried to put these in a casing to be able to change etc but
no luck as below:
var settings = {
$listContainer : $
('div.listContainer'),
        $container : $('div.calendarContainer'),
        Speed : 5,
        mouseWheel : true,
        heigthOful : $container.find('div.listContainer ul').height(),
        Time : parseInt(heigthOful)*Speed
}
but then when i run my plugin it fails and start to give me error
messag its say tha the
heigthOful : $container.find('div.listContainer ul').height(),
$container is undefined
if you could help withthis or give me a good tut on thsi would be
great
cheers si





























    • Topic Participants

    • simon