I'm brewing myself a stew of tons of Javascript libraries onto my MVC4 site.
But then i ran into a problem in IE9 (of cause)
inside a jQuery plugin i have this code:
(function ($) {
//define the tweetable plugin
$.fn.tweetable = function (options) {
//specify the plugins defauls
var defaults = {
limit: 1, //number of tweets to show
username: 'mthemes', //@username tweets to display
time: false, //display date
replies: false, //filter out @ replys
position: 'append' //append position
};
.................... more code ........
i was getting this error:
SCRIPT1003: Expected ':'
jquery.tweetable.js, line 20 character 51
SCRIPT438: Object doesn't support property or method 'tweetable'
scripts.js, line 108 character 2
SCRIPT438: Object doesn't support property or method 'tweetable'
scripts.js, line 108 character 2
pointing to the >username: 'mrthemes'< line
The script was added to the page using Scripts.Render("") together with other scripts, i didnt notice the problem before because i was using System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl which clears the comments.
Montago
Member
176 Points
90 Posts
Solution to: SCRIPT1003: Expected ':'
Jul 07, 2012 09:57 PM|LINK
I'm brewing myself a stew of tons of Javascript libraries onto my MVC4 site.
But then i ran into a problem in IE9 (of cause)
inside a jQuery plugin i have this code:
(function ($) { //define the tweetable plugin $.fn.tweetable = function (options) { //specify the plugins defauls var defaults = { limit: 1, //number of tweets to show username: 'mthemes', //@username tweets to display time: false, //display date replies: false, //filter out @ replys position: 'append' //append position }; .................... more code ........i was getting this error:
pointing to the >username: 'mrthemes'< line
The script was added to the page using Scripts.Render("") together with other scripts, i didnt notice the problem before because i was using System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl which clears the comments.
i then found this post : http://www.sencha.com/forum/showthread.php?150943-Weird-error-in-Internet-Explorer
stating that //@ has to be separated to '// @'
after doing that, i get no script errors.
Microsoft Gold Partner