javascript - Can't leverage working jsfiddle to work -
I am new to jsfiddle I am trying to take advantage of functionality from jsfiddle:
The piece is as follows:
$ ('# myTab a'). Click (function (e) {If ($ (this) .Parent ('li'). Haclus ('active')) {$ ($ (this) .attr ('href')) .hide ();} Else {e.preventDefault (); $ (this). Tab ('show');}});
However, when I try to use it in the normal HTML folder, only my HTML content works if someone changes external resources, javascript between right tags, and onload The event that is being called at the right place in JSFDial, it can really be useful !!
Thank you!
In addition to the adjustments given by user3558931 and as you mentioned in your comment that you want to know How to include external resources - To include JS- and CSS-files, add the following to your HTML:
& lt; Script src = "// ajax.googleapis.com/ajax/ libs / jQuery / 1.8.3 / jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "http://appliedinter.net/Workstream/common_files/js/plugins.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "http://appliedinter.net/Workstream/common_files/js/script.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js" & gt; & Lt; / Script & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" />
In the case of the bus it is not clear - if you include adjusted JS code in your HTML then it has to be wrapped in script tags:
& Lt; Add code from reply by script type = "text / javascript"> user3558931 // (which I just upvoted as OP upvote is not enough representative)
Update for comments: Although it is possible to get the suggested source in the mentioned YouTube video, just want to add: External files included include clicking on "external resources" in the left Right click on each file that appears, click "Copy Select the target ", and contains as JS or CSS file. Include the same with jquery-version made.
Comments
Post a Comment