jquery - Showing Javascript Panel -
In a big javascript application, I saw a javascript panel and just trying to apply the panel code. I copied and I thought the pieces of the code were useful for working in the pasted panel but unfortunately it is not working ..
HTML code ..
& Lt; Body & gt; & Lt; Div id = "rtfm" style = "display: none;" & Gt; & Lt; / Div & gt; & Lt ;! - Support panel - & gt; & Lt; Div id = "dashboard" & gt; & Lt; A href = "#" class = "help" & gt; Syntax help & lt; / A & gt; & Lt ;! - Clicking on it shows the panel - & gt; & Lt; / Div & gt; & Lt; Script src = "jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; (Function () {test = function (elt) {var dom = $ (elt) var == {helpPanel: HelpPanel ($ ('# rtfm')), init: function () {$ ('help'). Click (that.showHelp) $ (that.helpPanel) .bind ('closed', that.hideHelp) is back}}, showHelp: function (e) {that.helpPanel.reveal () dom.find (' Help ') .FadeOut () // trace (' help ') return false}, hide help: function (e) {trace (' off ') dom.find (' help ') .FadeIn ()}} Return To that.init ()}}) () & lt; / Script & gt; & Lt; Script src = "src / help.js" & gt; & Lt; / Script & gt; & Lt; / Body & gt;
I am not very knowledgeable about Javascript and appreciate that someone can help me ..
thanks ..
OK .. The problem arises. It is important to add code after calling it ..
$ (document) .ready (function () {var mcp = Test ()})
Comments
Post a Comment