954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Have link work when javascript is disabled

I want my links to work under My works when JavaScript is disabled. If someone could lead me in the right direction it would greatly be appreciated. Thank You

Here is the testing site:

http://illcomputers.comyr.com/portfolio/

JavaScript and Ajax:

<script type="text/javascript">
<!--
function show_div1() {
	
	document.getElementById('free').style.display = 'none';
	document.getElementById('ill').style.display = 'block';
	document.getElementById('text1').style.display = 'block';
	document.getElementById('flea').style.display = 'none';
	document.getElementById('text2').style.display = 'none';
	document.getElementById('text3').style.display = 'none';
	}
	
function show_div2() {
	
	document.getElementById('ill').style.display = 'none';
	document.getElementById('text1').style.display = 'none';
	document.getElementById('free').style.display = 'block';
	document.getElementById('text2').style.display = 'block';
	document.getElementById('flea').style.display = 'none';
	document.getElementById('text3').style.display = 'none';
	}

function show_div3() {
	
	document.getElementById('ill').style.display = 'none';
	document.getElementById('text1').style.display = 'none';
	document.getElementById('free').style.display = 'none';
	document.getElementById('flea').style.display = 'block';
	document.getElementById('text3').style.display = 'block';
	document.getElementById('text2').style.display = 'none';
	}
-->
</script>
<script  type="text/javascript" >
<!--
		$("#awork1").click(function () {
					$("#work1").fadeIn("slow");
					$("#work2").fadeOut("slow");
					$("#work3").fadeOut("slow");
					
					});
										
		$("#awork2").click(function () {
					$("#work2").fadeIn("slow");
					$("#work1").fadeOut("slow");
					$("#work3").fadeOut("slow");
					
					});
					
		$("#awork3").click(function () {
					$("#work3").fadeIn("slow");
					$("#work1").fadeOut("slow");
					$("#work2").fadeOut("slow");
					
					});



-->		
</script>


HTML:

<h1>My Works</h1>
				
<div id="works">

<a href="#" id="awork1" onclick="show_div1()" >iLL Technolgies</a>
					
<a href="#" id="awork2" onclick="show_div2()" >Meditation Freelancers</a>
					
<a href="#" id="awork3" onclick="show_div3()" >The Big Flea</a>

					
</div>
<ul id="websites">
				<li style="display:block;" id="work1">
				<a href="images/illume2.jpg" rel="lightbox" title="My Bussines - Ill Technologies" >
				<img src="images/illume.jpg" alt="Ill Technologies" id="ill" /></a>
				<p id="text1" > iLL Technologies. My business site, still a work in progress..</p>
				</li>
				<li style="display:none;" id="work2">
				<a href="images/freelance2.jpg" rel="lightbox"  title="Meditation Freelancers" >
				<img src="images/freelance.jpg" alt="Meditation Freelancers" id="free" /></a>
				<p id="text2" >A website I did for one my school projects</p>
				</li>
				<li style="display:none;" id="work3">
				<a href="images/bigflea2.jpg" rel="lightbox"  title="The Big Flea Market" >
				<img src="images/bigflea.jpg" alt="The Big Flea Market" id="flea" /></a>
				<p id="text3" >A Website I did for the Big Flea, a flea market in Cumberland, Rhode Island.</p>
				</li>
				<li id="description"></li>
</ul>
illum11
Newbie Poster
2 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 


I got it working, just had to add return false in onclick, so simple. lol

<h1>My Works</h1>
     
<div id="works">
     
<a href="#" id="awork1" onclick="show_div1();return false;" >iLL Technolgies</a>
     
<a href="#" id="awork2" onclick="show_div2();return false;" >Meditation Freelancers</a>
     
<a href="#" id="awork3" onclick="show_div3();return false;" >The Big Flea</a>
     
     
</div>
illum11
Newbie Poster
2 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You