Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'$' is undefined error with Internet Explorer
29th March, 12:30
Post: #1
'$' is undefined error with Internet Explorer
Hi Guys,

The QTip functionality is trying with the new java script file. The code is working fine with the Firefox and chrome. But the Internet Explorer show some error.

JS Code
/* jsHandler.js */
function inc(filename) {
    var body = document.getElementsByTagName('body').item(0);
    script = document.createElement('script');
    script.src = filename;
    script.type = 'text/javascript';
    body.appendChild(script)
}
inc("http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js");
inc("scripts/jquery.qtip-1.0.0-rc3-dm.js");
window.o<strong></strong>nload =  function () {
    $('[tooltip]').each(function () // Select all elements with the "tooltip" attribute
    {
        $(this).qtip(
            {
                style: {
                    border: {
                        width: 2,
                        radius: 1,
                        color: '#000'
                    },
                    background: '#ffffe0',
                    padding: 10,
                    textAlign: 'left',
                    tip: true // Give it a speech bubble tip with automatic corner detection
                },
                position: { corner: {
                    target: 'rightTop',
                    tooltip: 'bottomLeft'
                }
                },
                content: {
                    color: '#000',
                    text: $(this).attr('tooltip')
                },
                show: { solo: true, ready: false, when: false },
                hide: 'blur'
            }).bind('click', function () { return false; });
    });
};


Error (IE 8):
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
Timestamp: Tue, 29 Mar 2011 12:19:35 UTC

Message: Expected identifier
Line: 23
Char: 8
Code: 0
URI: http://localhost/Sample/scripts/jquery.qtip-1.0.0-rc3-dm.js

I tried with Visual Studio 2010

Microsoft JScript runtime error: Object expected
'$' is undefined


I would like thanks in advance
Find all posts by this user
Quote this message in a reply
30th March, 19:56
Post: #2
RE: '$' is undefined error with Internet Explorer
Looks like you're not including the JS library... since $ is undefined.

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
31st March, 05:21 (This post was last modified: 31st March 05:22 by Premraj.)
Post: #3
RE: '$' is undefined error with Internet Explorer
(30th March 19:56)Craig Wrote:  Looks like you're not including the JS library... since $ is undefined.

You can find the JS Lib included code. It works fine using in page level.
inc("http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js");
inc("scripts/jquery.qtip-1.0.0-rc3-dm.js");

The same code is working fine with Firefox and Chrome.
Find all posts by this user
Quote this message in a reply
31st March, 06:40
Post: #4
RE: '$' is undefined error with Internet Explorer
Hmm I'm not too sure in that case. If $ is undefined then it's a problem with jQuery not being found, that's for sure. Perhaps it's got something to do with how your including it. Any reason why you're doing it via JS instead of regular HTML?

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Solved] error when subscribing mplungjan 1 430 27th September 15:18
Last Post: Craig
  qtip thows script error 'parent is null' prasanthreddyp 1 556 12th September 17:16
Last Post: Craig
  [Solved] error: missing}after property list captamirul@yahoo.com 8 1,329 10th September 15:22
Last Post: Craig
  [Solved] Wierd error: "v is undefined" aquinn 6 2,233 3rd June 09:01
Last Post: Craig
  [Solved] $fn.qtip is undefined sunchaser 0 792 22nd May 17:05
Last Post: sunchaser
  [Solved] Works in IE7 initially, but then throws error tingiri 1 663 1st March 15:18
Last Post: Craig
  [Solved] "No such interface supported" error when using dynamic content url elitz 3 1,743 19th February 16:07
Last Post: Craig
  [Solved] Internet Explorer still shows default tooltip butch 15 3,449 25th January 14:23
Last Post: aibreanstudio
  [Solved] Click-to-activate tooltip -- error with IE6 todsa 9 1,623 6th January 03:19
Last Post: Craig
  [Solved] Getting a show.when.target.offset() is null error LordFury 4 1,701 13th December 01:35
Last Post: LordFury



User(s) browsing this thread: 1 Guest(s)