javascript - Best way to use multiple functions in jquery plugin development -
suppose have plugin named jquery.area.js , have various methods triangle, square etc
$.fn.area = function( options ){ if(options == 'sqaure') { square(); }else if(options == 'circle') { circle(); } ......and on } how use this? proper way have multiple function in jquery plugin?
$("#show").click( function(){ $(".area1").area('circle',{ x : 5 }); is right way?
Comments
Post a Comment