how do i make a cool clicky thing
#1
Posted 06 February 2010 - 04:03 AM
i just remade my server with leopard! but this time i won't do any cool web design crap. its really just a proxy for school. this is the site http://m3rg3.ath.cx
you see that xbox-tan girl? can someone explain to me how i could make it to where if you clicked it, a new picture would replace it? like "xbox girl" *click* "ttgl girl" *click* etc...
#3
Posted 06 February 2010 - 05:16 AM
#4
Posted 06 February 2010 - 08:25 AM
Try clicking the tan to see the next tan.
I added the following code to the <head> tag:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.cycle.all.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.1.1.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#scroll').cycle({
fx: 'scrollRight',
next: '#scroll',
timeout: 0,
easing: 'backinout'
})
});
</script>
The two js scripts loading from the js folder on my site. You can download them from
http://c0lin.org/M3R...ycle.all.min.js
http://c0lin.org/M3R...easing.1.1.1.js
just right-click save as.
and I also added the following <div> tag around your image:
<div id="scroll"> <img src="pictures/xbox-360-tan.jpg" border="0"> <img src="pictures/ps3tan.jpg" border="0"> </div>
and of course I added an extra image to show off the effect. You can add as many img tags as you want and it will roll through them.
#5
#6
Posted 06 February 2010 - 03:42 PM
EDIT: wait, where do the js files go?
EDIT: never mind i just read the code again lol.
EDIT X3: where can i add <center> tags?
#7
Posted 06 February 2010 - 08:16 PM
I was able to center the xbox tan and zoey by adding padding to the left of the two images. Basically I took the max width (800px) and subtracted the width of the image (447.6px for xboxtan) and divided the result by 2 (176px). I added it inline since it takes less characters to have it inline than creating separate classes for each.
Example: http://c0lin.org/M3RG3.ATH.CX/
Changed code:
<div id="scroll"> <img src="http://m3rg3.ath.cx/pictures/eva.jpg" height="600" width="800" border="0"> <img src="http://m3rg3.ath.cx/pictures/silent.png" height="600" width="800" border="0"> <img src="http://m3rg3.ath.cx/pictures/mirrors.jpg" height="600" width="800" border="0"> <img src="http://m3rg3.ath.cx/pictures/xbox-360-tan.jpg" height="600" width="447.6" border="0" style="padding-left: 176px;" /> <img src="http://m3rg3.ath.cx/pictures/prawn.jpg" height="600" width="800" border="0"> <img src="http://m3rg3.ath.cx/pictures/kagami2.png" height="600" width="800" border="0"> <img src="http://m3rg3.ath.cx/pictures/bam.jpg" height="600" width="800" border="0"> <img src="http://m3rg3.ath.cx/pictures/zoey.jpg" height="600" width="600" border="0" style="padding-left: 100px;" /> </div>
#8
Posted 06 February 2010 - 08:52 PM
#9
Posted 06 February 2010 - 09:09 PM
#11
Posted 06 February 2010 - 09:30 PM
The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
i don't get this one^
#12
Posted 06 February 2010 - 09:31 PM
For example your <img> tags actually need to be like <img /> since it doesn't have a closing </img> tag (closing img tags don't exist).
#13
Posted 06 February 2010 - 09:35 PM
#14
Posted 06 February 2010 - 09:53 PM
Line 45, Column 66: required attribute "alt" not specified…res/glider.png" height="40" width="40" border="0"/>✉
The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
#15
Posted 06 February 2010 - 09:59 PM
<img src="http://m3rg3.ath.cx/pictures/xbox-360-tan.jpg" alt="Xbox 360 Tan" height="600" width="447.6" border="0" style="padding-left: 300px;" />
#16
Posted 06 February 2010 - 10:01 PM


Back to top
MultiQuote

