今天调试代码的时候碰到一个小问题,jQuery选择器代码全部不起作用了,比如代码在争取引用jQuery后调用$(‘.foo’)的时候还是报错
TypeError: undefined is not a function
解决方法异常简单,原因是在把原先一个较大的js文件拆分成多个小的js文件后,最后一行没有用分号结尾。大部分的jQuery脚本都用(jQuery)结尾,如果没有用分号断行,浏览器就不知道把他们连接起来了。加上(jQuery);后问题完美解决。
今天调试代码的时候碰到一个小问题,jQuery选择器代码全部不起作用了,比如代码在争取引用jQuery后调用$(‘.foo’)的时候还是报错
TypeError: undefined is not a function
解决方法异常简单,原因是在把原先一个较大的js文件拆分成多个小的js文件后,最后一行没有用分号结尾。大部分的jQuery脚本都用(jQuery)结尾,如果没有用分号断行,浏览器就不知道把他们连接起来了。加上(jQuery);后问题完美解决。
You must be logged in to post a comment.
What’s Taking place i am new to this, I stumbled upon this I have found It positively helpful and it has
helped me out loads. I’m hoping to contribute & assist
different users like its helped me. Great job.
I conceive other website owners should take
this web site as an model, very clean and excellent user
genial design.
Visit my blog – personal sex ad
This case features a 3D kaws style doll on the again and is available in most iphone fashions.
Wow, incredible blog structure! How lengthy have you been blogging
for? you make running a blog glance easy. The
full look of your web site is great, let alone the content![X-N-E-W-L-I-N-S-P-I-N-X]I
just couldn’t leave your web site before suggesting that I extremely loved
the standard info a person provide to your visitors?
Is going to be back ceaselessly to investigate cross-check new posts.
My web site; facebook for sex (Raymond)
I would like to express my respect for your kindness for individuals who require guidance on this important
niche. Your personal commitment to passing the message all around turned out
to be amazingly important and have continuously allowed professionals like me to get to
their pursuits. This invaluable guideline implies
so much a person like me and a whole lot more to my office workers.
Thanks a ton; from everyone of us.
my page :: face book for sex
I conceive this internet site has got some really wonderful info for everyone :D.
Take a look at my page: craigslist sex hookups – Will –
Hey there just wanted to give you a quick heads up.
The text in your post seem to be running off the screen in Opera.
I’m not sure if this is a formatting issue or something to do
with internet browser compatibility but I figured I’d
post to let you know. The layout look great though!
Hope you get the problem solved soon. Cheers
Also visit my homepage … free sex ads
Thanks for the tips you are sharing on this site.
Another thing I’d prefer to say is that often getting hold of of your credit
file in order to scrutinize accuracy of the detail could be the first action you have to execute in credit
improvement. You are looking to clear your credit history from destructive details faults that ruin your credit score.
Feel free to surf to my blog aaronarauzh.com
Its actually a great and helpful piece of info. Im glad that
you shared this useful info with us. Please keep us up to date like this.
Thanks for sharing.
Feel free to visit my site … craiglistforsex [Marina]