javascript - Creating a jquery plugin with persistent data -


i have question ... in jquery can define plugin persistent data? example:

$.myplugin({    name  : "stefan",    lastname : "luv", });     $.myplugin({name:"another"});  console.log($.myplugin.getname());//prints "another"; console.log($.myplugin.getlastname());//prints "luv" preserve first data; 

thanks


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -