do-web / jTinder

jTinder is a javascript library that makes rating people, products, images very easy and fast. It is optimized for mobile touch device but has also a desktop fallback.
GNU General Public License v2.0
235 stars 99 forks source link

Destroy method for the plugin #33

Closed xzhibit closed 6 years ago

xzhibit commented 6 years ago

I created a destroy method for the plugin:

destroy: function(element){
    $(element).unbind();
    $(this.element).removeData();
},

and called using $("#tinderslide").data('plugin_jTinder').destroy();

muhalovic commented 6 years ago

Where do i put your code, sir? In what line?

xzhibit commented 6 years ago

I added mine just after init:function(element){ ... },, line 54, but I'm pretty sure it'll work anywhere as long as it's defined inside the prototype

muhalovic commented 6 years ago

Thank you, sir.

luckydevilru commented 5 years ago

Cannot read property 'destroy' of undefined

xzhibit commented 5 years ago

Cannot read property 'destroy' of undefined

Please provide more details: what issues you're having under which circumstance, and what have you tried so far?

luckydevilru commented 5 years ago

Cannot read property 'destroy' of undefined

Please provide more details: what issues you're having under which circumstance, and what have you tried so far?

it doesn't matter even after initialization it doesn't stop working of script

xzhibit commented 5 years ago

Cannot read property 'destroy' of undefined

Please provide more details: what issues you're having under which circumstance, and what have you tried so far?

it doesn't matter even after initialization it doesn't stop working of script

I'm unable to understand, can you send paste a small code sample?