Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

jquery doesn't run on local static site

Posted on 2013-06-02
2
416 Views
Last Modified: 2013-06-02
I have a static web site on iis 7 on local machine.  I have downoaded and added jquery and jquery ui.  I have added the following to my index page:

    <link href='css/themes/smoothness/jquery-ui-1.10.3.custom.css' rel='stylesheet' type='text/css' />
    <link href='css/demos.css' rel='stylesheet' type='text/css' />

      <link href='css/wdgt.css' rel='stylesheet' type='text/css' />

    <script src='js/jquery-1.9.1.js' type='text/javascript'></script>
    <script src='js/ui/jquery.ui.core.js' type='text/javascript'></script>
    <script src='js/ui/jquery.ui.widget.js' type='text/javascript'></script>
    <script src='js/ui/jquery.ui.datepicker.js' type='text/javascript'></script>

obviously, I'm trying to use the datepicker.

I also have this in the head section:
    <script type='text/javascript'>
        $(document).ready(function() {
                        alert('ready');
                $('#TourDate').datepicker({
                    onSelect: function (dateText, inst) { checkDay(dateText); }
                });

            }

        });

        function checkDay(dateText)
        {
                  alert('here');

        }

    </script>

nothing here works.  it appears that the first document.ready() is never called.  all pathing has been checked several times.  it doesn't work in IE 10 or chrome.  i'm totally stumped here and need help to show me the error of my ways!!

BTW, I can't ref the jquery stuff at google or any other external site.  It's not an option.
0
Comment
Question by:dhenderson12
2 Comments
 
LVL 10

Accepted Solution

by:
Ishaan Rawat earned 500 total points
ID: 39214461
Try this...

     
   $(document).ready(function() {
                        alert('ready');
                $('#TourDate').datepicker({
                    onSelect: function (dateText, inst) { checkDay(dateText); }
                });

          

        

        function checkDay(dateText)
        {
                  alert('here');

        }
});

Open in new window

0
 

Author Comment

by:dhenderson12
ID: 39214482
aaarrrrrggggghhhhhhhh!!!!!  I hate extra curly braces!!  thanks for loaning your eyes.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question