Writing jQuery plugin with ScriptSharp

Nov 6, 2009 at 2:23 PM

Do you know if it is possible to write jQuery plugins with scriptsharp? If so, do you have an example?

eg. consider following example of a simple jquery plugin, suppose I would want to write it using ScriptSharp, any idea how this would be done ?

# (function($){  
#   
#     $.fn.extend({   
#           
#         //pass the options variable to the function  
#         pluginname: function(options) {  
#   
#   
#             //Set the default values, use comma to separate the settings, example:  
#             var defaults = {  
#                 padding: 20,  
#                 mouseOverColor : '#000000',  
#                 mouseOutColor : '#ffffff'  
#             }  
#                   
#             var options =  $.extend(defaults, options);  
#   
#             return this.each(function() {  
#                 var o = options;  
#                   
#                 //code to be inserted here  
#                 //you can access the value like this  
#                 alert(o.padding);  
#               
#             });  
#         }  
#     });  
#       
# })(jQuery);