4 Replies - 2708 Views - Last Post: 22 December 2013 - 12:31 PM

#1 ItIntern3   User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 97
  • Joined: 14-July 10

Simple $(document).ready() Not Working

Posted 18 December 2013 - 05:51 PM

Hi All,

After I upgraded by jquery library from 1.6.2 to 1.9.1 (latest from jquery's web site) I have a simple piece of code that does not seem to be firing when the document is loaded:

$(document).ready(function () {                
                $('#testinputhide').hide();
            });



I want this function to hide some elements, and the #testinputhide is the id to an input element for testing purposes. I tried adding:
alert("message");
to test whether or not the function was being executed and it did not seem to be.

Here are my script includes:
<link rel="stylesheet" href="/Content/themes/smoothness/jquery-ui-1.10.3.custom.css" />
<script src="/Scripts/jquery-1.9.1.js" type="text/javascript"></script>
<script src="/Scripts/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>



Any guidance would be much appreciated, as I am baffled as to why this would not work anymore.

Thanks in advance!

Is This A Good Question/Topic? 0
  • +

Replies To: Simple $(document).ready() Not Working

#2 laytonsdad   User is offline

  • I identify as an attack helicopter!
  • member icon

Reputation: 467
  • View blog
  • Posts: 1,998
  • Joined: 30-April 10

Re: Simple $(document).ready() Not Working

Posted 18 December 2013 - 07:54 PM

Check your browser's console and see if it's not loading.

Chances are you have it in an other place.

This post has been edited by laytonsdad: 18 December 2013 - 07:54 PM

Was This Post Helpful? 1
  • +
  • -

#3 ItIntern3   User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 97
  • Joined: 14-July 10

Re: Simple $(document).ready() Not Working

Posted 19 December 2013 - 04:10 PM

Thanks for your suggestion. I was able to locate a faulty input mask jquery function (which was working with the 1.6.1 version).
Was This Post Helpful? 0
  • +
  • -

#4 laytonsdad   User is offline

  • I identify as an attack helicopter!
  • member icon

Reputation: 467
  • View blog
  • Posts: 1,998
  • Joined: 30-April 10

Re: Simple $(document).ready() Not Working

Posted 20 December 2013 - 03:03 AM

Glad you got it solved. :D
Was This Post Helpful? 0
  • +
  • -

#5 ItIntern3   User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 97
  • Joined: 14-July 10

Re: Simple $(document).ready() Not Working

Posted 22 December 2013 - 12:31 PM

From what I have read if jquery functions mysteriously do not work even though the syntax is correct according to the documentation on http://jquery.com/ there are conflicting library imports on occurring on the same page, essentially overwriting the constructed javascript object each jquery library creates.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1