Hi, I am trying to crate a panorama slider as a jQuery plugin, and I have the following code..
$.fn.panorama = function(settings) {
var myPanorama = this;
..
this.mousedown(function(e){
//do stuff
$(this).css... //this all work
}
//Call mouseup on document in case user lets go of mouse outside draggable object
$(document).mouseup(function(){
$(myPanorama).easeDragging(); //works but probably not the way to do it
this.easeDragging(); //ideal but refers to wrong object
});
}
My question is how do i refer to the "this" object inside the $(document).mouseup call?
Since it thinks "this" is the document itself and not the object attached to the plugin.
For now I am just making a variable and it works but there must be a better way!
thanks!