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

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -