Solved

ASP.net Javascript Slider Error

Posted on 2014-04-11
2
370 Views
Last Modified: 2014-04-13
Hi
I implemented a Javasript slider with the code below on my site www.leadershipsurvey.co.za
Now when I put the code below in a new site  I get the error shown in the image

1
       
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $('.slider img:gt(0)').hide();
            setInterval(function () { $('.slider :first-child').fadeOut(2000).next('img').fadeIn(2000).end().appendTo('.slider'); }, 5000); /*5 sec*/
        });
    </script>
    <style type="text/css">
	.slider { clear:both; position:relative; height:240px; width:950px; }
	.slider img { position:absolute; left:0; top:0;cursor:pointer; }
    </style>


    <div class="slider" style="margin:0 auto;">
        <img src="Images_Slide2/1.jpg" />
        <img src="Images_Slide2/2.jpg" />
        <img src="Images_Slide2/3.jpg" />
        <img src="Images_Slide2/4.jpg" />
        <img src="Images_Slide2/5.jpg" />
        <img src="Images_Slide2/6.jpg" />
        <img src="Images_Slide2/7.jpg" />
        <img src="Images_Slide2/8.jpg" />
        <img src="Images_Slide2/9.jpg" />
        <img src="Images_Slide2/10.jpg" />
    </div>

Open in new window

0
Comment
Question by:murbro
2 Comments
 
LVL 18

Accepted Solution

by:
Gary Davis earned 500 total points
ID: 39996697
I went to your site and see the code and it does not get the JavaScript error you show.

When "$" is undefined, it generally means the jQuery has not been pulled in with the <script> tag prior to its use but in your case, it is via the CDN.

It is possible if your page is displayed as https and your script pulls in jQuery with http you may not get the script, but this does not appear to be your issue.

Gary Davis
0
 

Author Closing Comment

by:murbro
ID: 39997294
Thanks
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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 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…

816 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

12 Experts available now in Live!

Get 1:1 Help Now