Link to home
Create AccountLog in
Avatar of Michael Sterling
Michael SterlingFlag for United States of America

asked on

Why is "jQuery is not found""

i have a page (master page) that contains the scripts / links in the attached code. when rendered i get "jQuery is not found" on lines 18 and 35. i have no idea why. please advise.
<script type="text/javascript" src="/JavaScript/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="/JavaScript/jquery.ui.widget.js"></script>
    <script type="text/javascript" src="/JavaScript/jquery.ui.button.js"></script>
    <script type="text/javascript" src="/JavaScript/"></script>
    <script type="text/javascript" src="/JavaScript/admin.session.min.js"></script>
    <script type="text/javascript" src="/Javascript/hoverIntent.min.js"></script>
    <script type="text/javascript" src="/Javascript/superfish.min.js"></script>
        <link runat="server" rel="stylesheet" href="~/CSS/Import.css" type="text/css" id="AdaptersInvariantImportCSS" />
    <link runat="server" rel="Stylesheet" href="~/CSS/superfish.min.css" type="text/css"
        id="superfishCss" />
    <link runat="server" rel="Stylesheet" href="~/CSS/superfish-navbar.min.css" type="text/css"
        id="navbarCss" />
    <link runat="server" rel="stylesheet" href="~/CSS/smoothness/jquery.ui.theme.css"
        type="text/css" id="jquery_ui_css" />
    <link runat="server" rel="stylesheet" href="~/CSS/admin_print.min.css" type="text/css"
        id="admin_print_css" media="print" />
    <script type="text/javascript">
line 18 here -->        jQuery(function () {
            <asp:PlaceHolder ID="phSessionTimeout" runat="server">
            if (SessionNotification)
                SessionNotification.Init(<asp:Literal ID="litSessionTimeout" runat="server" />);

        jQuery(document).ready(function () {
            jQuery('.sf-menu ul.AspNet-Menu').superfish({
                pathClass: 'current',
                autoArrows: false,
                dropShadows: false,
                delay: 1000

        function pageLoad(sender, args) {
line 35 here -->  jQuery('.dl-popup-server').center();
                jQuery(this).addClass("dl-grid-button ui-corner-all");

        jQuery.fn.getIconClass = function () {
            return jQuery(this).getFirstClassWithPrefix("ui-icon-");

        jQuery.fn.getFirstClassWithPrefix = function (prefix) {
            var found = '';
            var cn = jQuery(this).attr("class");
            if (!cn)
                return found;
            var classes = cn.split(" ");
            for (var i = 0; i < classes.length; i++) {
                if (classes[i].match("^" + prefix) == prefix) {
                    found = classes[i];
            return found;

Open in new window

Avatar of Hammo777

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Michael Sterling


you are correct. the scripts are there, so how do i ensure that they are found?
Avatar of Hammo777

Based on the path it is expecting to find the script under the root of your webserver in the Javascript folder.  Is that where it is?  What about permissions to the file?  in firebug you can see the error returned by the webserver  (error code and not found or permissions related error).  Is it a page I can get to?

Also, I generally see a '$' used to represent JQuery.  So it is $(document).ready instead of jQuery(document).ready.  But, I believe your syntax is ok too.
i've got most of the errors solved. my latest has to do with the ajaxcontroltoolkit and switching to using the toolkitscript manager, do i do this? i've included the error and a line from my webconfig...
AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.

    <pages masterPageFile="~/site.Master">
        <add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit"/>

Open in new window

never mind that last question i got it figured out...thanks for your help
never mind that last question i got it figured out...thanks for your help