Announcement Announcement Module
Collapse
No announcement yet.
Trouble with javascript / jquery hover images Page Title Module
Move Remove Collapse
Search Search Module
Collapse

Advertisement Advertisement Module
Collapse

Featured Images Featured Images Module
Collapse

Mediabistro Creative Sites Mediabistro Creative Sites Module
Collapse
Latest Topics Latest Topics Module
Collapse

  • Diggidy
    Graphic Designer for mobile video game
    Diggidy
    We are in need of a Graphic Designer for mobile video game. The game is a 2D platformer style game.
    Please send your resume/website/past work in order to be considered. In return you will be sent...
    Today, 04:30 PM
  • <b>
    Reply to Crisp web graphics, how?
    <b>
    That will produce worse results. For example, if you specify the size in which the image displays as 200 x 200 pixels, but you upload a 300 x 300-pixel image, your browser will still need to display that...
    Today, 03:53 PM
  • kemingMatters
    Reply to Crisp web graphics, how?
    kemingMatters
    Sorry I'm not familiar with square space, so .svg might not be the answer. Is your MBP at retina model?
    Are you exporting as png from illustrator? have you tried saving for web via photoshop?...
    Today, 03:32 PM
  • Cosmo
    Comment on High School Football Program
    Cosmo
    Yeah. I can't tell you how many ads I got that was literally four or five photographs cut up with scissors taped to a piece of notebook paper with barely legible handwriting on it. I was always so tempted...
    Today, 03:32 PM
  • N2950H
    Reply to Modifying a 3D plane in Illustrator
    N2950H
    Sorry about that, I'm embedding it this time.

    I am basically trying to warp an area of the object I have created in Illustrator, but I tried the "warp" function and it isn't what...
    Today, 02:57 PM
Advertisement Advertisement Module
Collapse

Sponsors Sponsors Module
Collapse

X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trouble with javascript / jquery hover images

    Hi

    Having a spot of bother trying to get javascript image rollover links working.

    Can get some, but when I repeat the code, they dont work!

    Any help would be great -

    Site

    tomparkes.co.nz/Work.html



    Here is my body code

    <body>

    <div id="facebook"><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftomparkes.co.nz&amp;sen d=false&amp;layout=standard&amp;width=450&amp;show _faces=true&amp;action=like&amp;colorscheme=light& amp;font&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; float:right; bottom: 0px; right: 0px; position:fixed; width:auto; height:80px;" allowTransparency="true"> </iframe></div>



    <div class="container_12" id="container">

    <div class="container_12" id="banner">
    <div class="grid_2" id="logo"><a href="index.html"><img src="images/logo.png" width="158" height="113" /></a></div>

    <div class="grid_2 push_8" id="bannerinfo"><h2>Tom Parkes_ Graphic + Type + Web Design</h2></div>

    <div class="grid_2 push_8"><h1><a href="mailto:tom.pparkes@gmail.com">tom.pparkes@gm ail.com</a> +64 0220377249</h1>
    </div>


    </div>






    <div class="clear"></div>
    <div class="clearfix" id="bannerspace"></div>

    <div class="grid_2" id="holder"><img src="images/holder.png" width="140" height="595" alt="cant show" />


    <div class="grid_2" id="menu" rel="stylesheet">

    <div class="grid_2" id="mainmenu">


    <ul id="mainnav">


    <li> <a href="index.html" id="mainnav">Home</a></li>
    <li> <a href="about.html" id="mainnav">About</a></li>
    <li> <a href="Work.html" id="mainnav">Work</a></li>
    <li> <a href="contact.html" id="mainnav">Contact</a></li>

    </ul>

    </div>


    <div class="grid_2" id="workmenu">

    <ul>

    <li>
    <a href="hopheadpete.html"><em>Hop Head Pete</em></a></li>
    <li>
    <a href="stuckonquailisland.html"><em>Stuck on Quail Island</em></a></li>
    <li>
    <a href="Punctuatedhistory.html"><em>A Punctuated History</em></a></li>
    <li>
    <a href="stamps.html"><em>Massey 125 Year Stamps</em></a></li>


    </ul>


    </div>

    </div>
    </div>





    <div class="grid_9 push_1" id="bigimage">

    <div id="gallery">

    <div class="grid_3" id="workicons">

    <div class="fadehover">
    <a href="hopheadpete.html"><img src="images/hopicon.png" alt="" class="a" />
    <img src="images/hophover.png" alt="" class="b" /></a>
    </div>


    </div>



    <div class="grid_3" id="workicons">


    <div class="fadehover">





    <img src="images/punctuated.png"alt="" class="a" />
    <img src="images/punchover.png" alt="" class="b" />





    </div>


    </div>

    <div class="grid_3" id="workicons">

    <div class="fadehover">
    <img src="images/quailicon.png" alt="" class="a" />
    <img src="images/qhover.png" alt="" class="b" />
    </div>






    </div>

    <div class="fadehover">
    <a href="punctuatedhistory.html"><img src="images/hopicon.png" alt="" class="a" />
    <img src="images/hophover.png" alt="" class="b" /></a>
    </div>








    </div>

    </div>
    </div>
    </div>
    </div>
    </body>

  • #2
    After pasting this into the forums, I see it butchered the code, it turned my tabs into super tabs, if you copy and paste it into your editor, it should format it to where it's clean and neat. It does in Sublime Text 2 and Komodo Edit at least. Anyway -->

    You had 2 extra </div>'s at the end, and you have #workimage being used over and over. ID's should only be used once, classes are for multiples.
    You didn't post the jQuery so I can't confirm that either of these is the source of your trouble, but hopefully it helps.
    On a side note, it you indent your code to show what's nested inside of what, you can spot the extra div's and things of that nature a lot easier. It may have been formatted before you posted, I don't know, but if not, I highly suggest you write it out that way, it's a huge help when you're troubleshooting your code. Noting what each </div> is after you close it helps a lot as well for those times when there is a page and a half of code within a container and you cant see where it starts.

    Code:
    <body>
    	<div id="facebook">
    		<iframe 
    			src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftomparkes.co.nz&amp;sen d=false&amp;layout=standard&amp;width=450&amp;show _faces=true&amp;action=like&amp;colorscheme=light& amp;font&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; float:right; bottom: 0px; right: 0px; position:fixed; width:auto; height:80px;" allowTransparency="true"> 
    		</iframe>
    	</div> <!-- End #facebook -->
    	<div class="container_12" id="container">
    		<div class="container_12" id="banner">
    			<div class="grid_2" id="logo">
    				<a href="index.html"><img src="images/logo.png" width="158" height="113" /></a>
    			</div>
    			<div class="grid_2 push_8" id="bannerinfo">
    				<h2>Tom Parkes_ Graphic + Type + Web Design</h2>
    			</div> 
    			<div class="grid_2 push_8">
    				<h1>
    					<a href="mailto:tom.pparkes@gmail.com">tom.pparkes@gm ail.com</a> +64 0220377249
    				</h1>
    			</div>
    		</div> <!-- End #banner -->
    		<div class="clear"></div>
    		<div class="clearfix" id="bannerspace"></div>
    		<div class="grid_2" id="holder">
    			<img src="images/holder.png" width="140" height="595" alt="cant show" />
    			<div class="grid_2" id="menu" rel="stylesheet">
    				<div class="grid_2" id="mainmenu">
    					<ul id="mainnav">
    						<li> <a href="index.html" id="mainnav">Home</a></li> 
    						<li> <a href="about.html" id="mainnav">About</a></li>
    						<li> <a href="Work.html" id="mainnav">Work</a></li>
    						<li> <a href="contact.html" id="mainnav">Contact</a></li>
    					</ul>
    				</div> <!-- End #mainmenu -->
    				<div class="grid_2" id="workmenu"> 
    					<ul>
    						<li>
    							<a href="hopheadpete.html"><em>Hop Head Pete</em></a>
    						</li>
    						<li>
    							<a href="stuckonquailisland.html"><em>Stuck on Quail Island</em></a>
    						</li>
    						<li>
    							<a href="Punctuatedhistory.html"><em>A Punctuated History</em></a>
    						</li>
    						<li>
    							<a href="stamps.html"><em>Massey 125 Year Stamps</em></a>
    						</li>
    					</ul>
    				</div> <!-- End #workmenu -->
    			</div> <!-- End #menu -->
    		</div> <!-- End #holder -->
    		<div class="grid_9 push_1" id="bigimage">
    			<div id="gallery">
    				<div class="grid_3" id="workicons">
    					<div class="fadehover">
    						<a href="hopheadpete.html">
    							<img src="images/hopicon.png" alt="" class="a" />
    							<img src="images/hophover.png" alt="" class="b" />
    						</a>
    					</div> <!-- End .fadehover -->
    				</div> <!-- End #workicons -->
    				<div class="grid_3" id="workicons">
    					<div class="fadehover">
    						<img src="images/punctuated.png"alt="" class="a" />
    						<img src="images/punchover.png" alt="" class="b" />
    					</div> <!-- End .fadehover -->
    				</div> <!-- End #workicons -->
    				<div class="grid_3" id="workicons">
    					<div class="fadehover">
    						<img src="images/quailicon.png" alt="" class="a" />
    						<img src="images/qhover.png" alt="" class="b" />
    					</div> <!-- End .fadehover -->
    				</div> <!-- End #workicons -->
    				<div class="fadehover">
    					<a href="punctuatedhistory.html">
    						<img src="images/hopicon.png" alt="" class="a" />
    						<img src="images/hophover.png" alt="" class="b" />
    					</a>
    				</div>
    			</div> <!-- End #gallery -->
    		</div><!-- End #bigimage -->
    	</div> <!-- End #container -->
    </body>

    Comment

     
    home | site map | advertising/sponsorships | about us | careers | contact us | help courses | browse jobs | freelancers | events | forums | content | member benefits | reprints & permissions about | terms of use | privacy policy | Copyright © 2014 Mediabistro Inc. Mediabistro Inc. call (212) 389-2000 or email us
    Working...
    X