Solved

jquery doesn't run on local static site

Posted on 2013-06-02
2
415 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn how to dynamically set the form action using jQuery.
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)

803 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