How to access a jQuery object instance?
Hello there,
I would like to know how i can access properties of a jQuery object
instance.
I have the following javascript
-
(function($){
var opts;
var sValue;
$.fn.jobject = function(options){
opts = $.extend({}, $.fn.jobject.defaults, options);
$.fn.jobject.initialize();
return this.each(function(){
$(this).mouseover(function(){
alert(sValue);
return false;
});
});
};
$.fn.jobject.initialize = function(){
//
};
})(jQuery);
$(document).ready(function(){
$(".jobject").jobject();
});
I would like to access the instance from my HTML file and pass value's
<script type="text/javascript">
jObject.sValue = "a value
";
</script>
How can I do this?
The way jQuery is written confuses me a little (just started using it)
Thanks in advance
[/code]