Skip to content Skip to sidebar Skip to footer

Jquery Plugin: How To Access Elements Where Plugin Was Applied From Secondary Function?

I am new to jQuery and I am building a custom plugin, it looks something like this (pseudo-code): jQuery.fn.myPlugin = function( options ) { var defaults = { interval

Solution 1:

You need to put it in a variable:

var elements = this;

Post a Comment for "Jquery Plugin: How To Access Elements Where Plugin Was Applied From Secondary Function?"