jquery - Javascript not loading in website -


I have a button in my website that clicks on popping up on the menu and I have correctly inserted the JS file It does not seem to work, but it does not seem to work. There is an error with the JS file or HTML files are as follows

mainfile.js

  var $ blob = $ ('& lt; blob / & gt;'); Var $ blob2 = $ ('& lt; blob class = "blob2" / & gt;'); $ ('# Sidebar toggle') ('Click', function) ($ {this} .closest ('Menu'). ToggleClass ('Open'); $ ('. Page') Toggleclass ('open');}); $ ('.link'). ('Mouseleave touch', function (e) {//e.preventDefault (); $ blob.css ({top: e.offsetY + 'px', left: e.offsetx + 'px'}); $ blob RemoveClass ('scale');}); $ ('.link'). ('Mousemov Touchmov', function (e) {eprovint default (); $ (this) .fund ('bob'). Css ({top: e. Offset y + 'px', on the left side: e.offsetx + 'Px'})}}); $ ('. Sidebar') ('Mausamov Touchmov', function (e) {e.preventDefault ();}); $ ('.link'). ('Mousecenter touchstart', function (e) {$ blob.css ({top: e.phosphates + 'px', left: e.offet x + 'px'}); $ (this) .end ($ blob ); SetTimeout (function () {$ blob.addClass ('scale');}, 20);}); $ ('.link'). ('Click', function (e) {e.preventDefault (); $ blob2.css ({top: e.offsetY + 'px', left: e.offsetx + 'px'} $ Blob2.removeClass ('scale' ); $ (This) .append ($ blob2); setTimeout (function () {$ blob2.addClass ('scale');}, 20); var target = $ (this) .attr ('href'); var Scroll = $ (target) [0] .offetttop-70; $ ('HTML, body'). ({Scrollbop: scroll});};);  

HTML button element:

  & lt; script src = "js / mainfile.js">  

You should use the always fall-back method You are going to use the CDN, if the CDN is not available for the library. This means downloading a copy of jQuery and storing it locally. You can use this code -

  & lt; Script type = "text / javascript" src = "// ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; If (type of jQuery == 'undefined') {document.write (unescape ("% 3Cscript src = 'path / to / jquery-1.11.1.min.js' type = 'text / javascript'% 3E% 3C / Script% 3E ")); } & Lt; / Script & gt;  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -