www.webdeveloper.com
Results 1 to 4 of 4

Thread: Help with jQuery, please.

  1. #1
    Join Date
    Jan 2014
    Posts
    10

    Unhappy Help with jQuery, please.

    Hey all,
    I am teaching myself web programming and I have ran into a problem. It should be easy for all of you but I have tried everything I can think of. I am trying to start with jquery but it seems I have done something wrong. It doesn't want to work no matter what I do. It works when I use it "inline" inside my HTML file, but when I try and use external files... it fails.

    Ill paste my HTML,and a simple line of jQuery because I can't get anything to work, and not even sure if I have the file set up right. Am I doing something wrong with my HTML? my directory is set up fine and all the files are where they need/supose to be.

    I hope this isn't too confusing to understand. Any help will be very much appreciated. Thank you. P.S. Any tips on my HTML would be cool too.



    HTML Code:
    <!DOCTYPE html>
    <html>
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Illusive Minds Media</title>
    
    <script src="js/jquery.js"></script><!-- jQuery Library -->
    
    
    <link rel="stylesheet" href="footer.css" type="text/css" media="screen" /><!-- Footer Stylings -->
    <link rel="stylesheet" href="head.css" type="text/css" media="screen" /><!-- Footer Stylings -->
    
    
    <!-- The following code targets IE6 only and enables mouse hover on non-anchor tags -->
    <!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="htc/ie6.css" />
    <![endif]-->
    
    </head>
    
    <body>
    
    	<div id="header"><!-- BEGIN HEADER -->
    
    		<div id="headerLogo">
    			<img  id="headerImage" class="center" src="img/headerLogo.png" alt="Illusive Minds Media">
    Jquery:

    Code:
    $(document).ready(function(){
      $("#navPhoto").hide(function(){
    
    });

  2. #2
    Join Date
    Jan 2014
    Posts
    10

    HTML fix

    for some reason not all the html went through, but here it is.

    <!DOCTYPE html>
    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Illusive Minds Media</title>

    <script src="js/jquery.js"></script><!-- jQuery Library -->


    <link rel="stylesheet" href="footer.css" type="text/css" media="screen" /><!-- Footer Stylings -->
    <link rel="stylesheet" href="head.css" type="text/css" media="screen" /><!-- Footer Stylings -->


    <!-- The following code targets IE6 only and enables mouse hover on non-anchor tags -->
    <!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="htc/ie6.css" />
    <![endif]-->

    </head>

    <body>

    <div id="header"><!-- BEGIN HEADER -->

    <div id="headerLogo">
    <img id="headerImage" class="center" src="img/headerLogo.png" alt="Illusive Minds Media">
    </div>

    <nav id="navBar">
    <a id="navPhoto" href="#">Photography</a>
    <a id="navCinema" href="#">Cinematography</a>
    <a id="navWeb" href="#">Web</a>
    <a id="navDesign" href="#">Design</a>
    <a id="navConnect" href="#">Connect</a>
    <a id="navTheMinds" href="#">The Minds</a>
    </nav>

    <div id="slider"></div>

    </div><!-- END HEADER -->

    <!-- ____________________________________________________________________________________________________ _-->



    <div id="footer"><!-- BEGIN FOOTER CONTAINER -->


    <ul id="footer_menu"><!-- Begin Footer Menu -->


    <li class="imgmenu"><a href="#"></a></li><!-- This Item is an Image -->


    <li><a href="#">My Account</a><!-- Begin Second Menu Item -->

    <ul class="dropup"><!-- Default Drop Up List -->

    <li><form id="login">
    <h1>Log In</h1>
    <fieldset id="inputs">
    <input id="username" type="text" placeholder="Username" autofocus required>
    <input id="password" type="password" placeholder="Password" required>
    </fieldset>

    <fieldset id="actions">
    <input type="submit" id="submit" value="Log in">
    <a href="">Forgot your password?</a><a href="">Register</a>
    </fieldset>
    </form></li>

    </ul><!-- End Drop Up List -->

    </li><!-- End Second Menu Item -->


    <li class="right"><a href="#" class="drop">Logout</a><!-- Begin Right Aligned Item -->

    </li><!-- End Right Aligned Item -->



    </ul><!-- End Footer Menu -->


    <!--<p><a href="#">StickyFooter</a> &copy; 2010 All Rights Reserved.</p> -->


    <ul id="social"><!-- Social Icons -->

    <!-- The span is the text appearing on hover, use the tooltip class in the link -->
    <li><a href="#" class="tooltip"><img src='img/twitter.png' alt="" /><span>Twitter</span></a></li>
    <li><a href="#" class="tooltip"><img src='img/rss.png' alt="" /><span>RSS</span></a></li>
    <li><a href="#" class="tooltip"><img src='img/flickr.png' alt="" /><span>Flickr</span></a></li>
    <li><a href="#" class="tooltip"><img src='img/facebook.png' alt="" /><span>Facebook</span></a></li>

    </ul><!-- End Social Icons -->



    </div><!-- END FOOTER CONTAINER -->

    <form id="login">
    <h1>Log In</h1>
    <fieldset id="inputs">
    <input id="username" type="text" placeholder="Username" autofocus required>
    <input id="password" type="password" placeholder="Password" required>
    </fieldset>
    <fieldset id="actions">
    <input type="submit" id="submit" value="Log in">
    <a href="">Forgot your password?</a><a href="">Register</a>
    </fieldset>
    </form>


    <script src="js/nav.js"></script><!-- NavBar Animations -->


    </body>
    </html>

  3. #3
    Join Date
    Feb 2012
    Location
    Tallahassee, FL
    Posts
    280
    Check your console.
    Chrome, IE,FF (probably other too but didnt check): Press F12->Click Console->Refresh Page
    If there are no errors there, go to the Network tab and see if there are any 404 issues.

  4. #4
    Join Date
    Jan 2014
    Posts
    10
    Thank you NoEffin,

    It gave me an error that was in my jquery. I did something wrong in there, though I couldn't see what it was I just re-wrote it and everything works fine now.

    thank you,
    UttermostChuck

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles