Solved

jquery doesn't run on local static site

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

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 to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Hi all! Recently there was EE question and the person wanted to have a multi-column textbox <div> selection, so as a first step to answer I provided a link but that was not complete with JavaScript selection, but had a good style sheet. So as a ques…
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
The viewer will learn how to dynamically set the form action using jQuery.
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now