javascript - Object literal as function argument with jQuery -


I have the script need to call the function from the following which is within the parameter object. Can say " open " is this possible? I tried calling it with " callIt " but it is not working how I can do it.

  & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Object with Agrimes & lt; / Title & gt; & Lt; Script src = "http://code.jquery.com/jquery-2.1.1.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body onload = "callIt ()" & gt; & Lt; Script type = "text / javascript" & gt; $ .fn.myplugin = function (settings) {var options = jQuery.extend ({name: "MyPlugin", the target document, open: function () {at document.write ( 'open');}, close: Function () {}, on selection: function () {}}, settings); Document.write (options.name + '& lt; br / & gt;')} function callIt () {$ .fn.myPlugin.options.onOpen (); } & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt;  


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -