hi im creating a plugin with chaining the problem is I want to select elements outside of the THIS element e.g
return $this.each(function() {
$('body $left .filter-wrapper input[type=checkbox]', document).change(function() {
alert('changed');// I want to break out side the scope how do i do that
and select element that aren't in $('mygrid').Grid()
// ive tried $('body $left .filter-wrapper input[type=checkbox]')
// that doesn't work either
}).find(this).filter(....).click(function() {
// this refers to mygrid which is what i want but the ubove code doen't work
}).find(....).click(function(){
// do more stuff here
}).bind('....')
});
$(‘mygrid’).Grid()
Please check the formatting of your question, it’s very hard to read.
If you want to select elements outside $(this), you can consider selecting them like you would normally do:
Alternatively, you can use $.proxy() to pass the current context to your method:
http://api.jquery.com/jQuery.proxy/