Jump to content

jnf555

Members
  • Posts

    281
  • Joined

  • Last visited

About jnf555

  • Birthday 05/21/1950

Profile Information

  • Location
    u.k

jnf555's Achievements

Member

Member (2/7)

8

Reputation

  1. jnf555

    jquery slider

    ok thanks,i understand that. thanks for what help you have given me
  2. jnf555

    jquery slider

    i think there is proberbly a lot of learners that use this forum that have missed of brackets etc, if they got it right they wouldnt need to ask the experts.which i didnt think was a problem.
  3. jnf555

    jquery slider

    thanks for replies, made some changes<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>jquery learning</title><style type="text/css">.slider{width:350px;height:250px;overflow:hidden;margin:30px auto;}.slider img{width:350px;height:250px;display:none;}</style><script type="text/javascript"src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script><script type="text/javascript"src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script><script type="text/javascript">function gallery(){$(".slider #a1").show("fade",500);$(".slider #a1").delay(5500).hide("slide",{direction:'left',500);var sc = $(".slider img").size();var count = 2;setinterval(function(){$(".slider #"+count).show("slide",{direction:'right'},500);$(".slider #"+count).delay(5500).hide("slide",{direction:'left'},500);if(count == sc){count = 1;}else{count = count + 1;}},6500);}</script></head><body onload="gallery();"><div class="slider"><img id="a1" src="images/pic1.jpg" border="0" alt="pic1" /><img id="b2" src="images/pic2.jpg" border="0" alt="pic1" /><img id="c3" src="images/pic3.jpg" border="0" alt="pic1" /><img id="d4" src="images/pic4.jpg" border="0" alt="pic1" /></div></body></html>
  4. hi this jquery code should slide from one img to another, but it dont, any help i will be glad of <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>jquery learning</title><style type="text/css">.slider{width:350px;height:250px;overflow:hidden;margin:30px auto;}.slider img{width:350px;height:250px;display:none;}</style><script type="text/javascript"src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script><script type="text/javascript"src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script><script type="text/javascript">function Slider(){$(".slider#1").show("fade",500);$(".slider#1").delay(5500).hide("slide",{direction:'left',500);var sc = $(".slider img").size();var count = 2;setinterval(function(){$(".slider#"+count).show("slide",{direction:'right'},500);$(".slider#"+count).delay(5500).hide("slide",{direction:'left'},500);if(count == sc){count = 1;}else{count = count + 1;}},6500);}</script> </head><body onload="slider();"><div class="slider"><img id="1" src="images/pic1.jpg" border="0" alt="pic1" /><img id="2" src="images/pic2.jpg" border="0" alt="pic1" /><img id="3" src="images/pic3.jpg" border="0" alt="pic1" /><img id="4" src="images/pic4.jpg" border="0" alt="pic1" /></div></body></html>
  5. jnf555

    looping

    there we go this works fine <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><title>new project</title><head></head><body><div id="jnf"></div><script type="text/javascript">var jnf2 = document.getElementById('jnf'); var names = ['john','gail','julie','jason','zoe'];var allnames = names.length;var i = 0;function loop(){if (i > (allnames - 1))i = 0;{jnf2.innerHTML = (names);}i++;loopTimer = setTimeout('loop()',3000);}loop();</script></body></html>
  6. jnf555

    looping

    thanks for repies
  7. jnf555

    looping

    hi any one help with this script i want it to go from one name to another one without stopping <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><title>new project</title><head></head><body><script type="text/javascript">var names = ['john','gail','julie','jason','zoe'];var allnames = names.length;var i = 0;function loop(){if (i > (allnames - 1))i = 0;{document.write(names);}i++;loopTimer = setTimeout('loop()',3000);}loop();</script></body></html> thanks for any help
  8. jnf555

    slideshow

    At long last i have managed to acheive what i was aiming to do.change from one img to another, as in a slideshowMany thanks to everyone that has helped <!DOCTYPE html><html lang="en-us"><head><head><title></title><script type="text/javascript">var image1=new Image ()image1.src="pic1.jpg"var image2=new Image ()image2.src="pic2.jpg"var image3=new Image ()image3.src="pic3.jpg"</script><style type="text/css"></style></head><body><div id="myScreen"></div><div id="myTV"><div id="myScreen"></div></div><script type="text/javascript">var myScreen = document.getElementById('myScreen');var myPics = ['pic1.jpg','pic2.jpg','pic3.jpg'];var totalPics = myPics.length;var i = 0;function loop() {if(i > (totalPics - 1)){i = 0;}myScreen.innerHTML = '<img src="'+myPics+'">';i++;loopTimer = setTimeout('loop()',5000);}loop();</script></body></html>
  9. jnf555

    slideshow

    thanks for reply you are right i have very little experience. i probably keep guessing due to my lack of experience, but i am trying to learn javascript
  10. jnf555

    slideshow

    just for a matter of interest this is where i had the code from, maybe i should try my own coding http://www.developphp.com/view.php?tid=1251
  11. jnf555

    slideshow

    thanks for your help, i will check that much appreciated thanks again jnf555
  12. jnf555

    slideshow

    i though slide show explained what i was trying to achieve, which is the title of this post
  13. jnf555

    slideshow

    i am expecting the images to change from one to another as in a slideshow.thanks
  14. jnf555

    slideshow

    thanks for replies, the problem is it doesn't work, i must have something wrong <!DOCTYPE html><html><head><script type="text/javascript"><!-->var image1=new Image ()image1.src="pic1.jpg"var image2=new Image ()image2.src="pic2.jpg"var image3=new Image ()image3.src="pic3.jpg"//--></script><style type="text/css">#myTV {background-image:url(screen.jpg);width:269px;height:164px;padding-top:20px;}#myScreen {width:228px;height:128px;margin-left:21px;}</style></head><body><div id="myTV"><div id="myScreen"></div></div><script type="text/javascript">var myScreen = document.getElementById('myScreen');var myPics = ['pic1.jpg','pic2.jpg','pic3.jpg'];var totalPics = myPics.length;var i = 0;function loop() {if(i > (totalPics - 1)){i = 0;}myScreen.innerHTML = '<img src="pic1.jpg"/'+myPics+'">';i++;loopTimer = setTimeout('loop()',3000);}loop();</script></body></html>
  15. jnf555

    slideshow

    is this going in the right direction, or have i missed something <!DOCTYPE html><html><head><script type="text/javascript">var image1=new image ()image1.src="pic1.jpg"var image2=new image ()image2.src="pic2.jpg"var image3=new image ()image3.src="pic.jpg"</script><style type="text/css">#myTV {background-image:url(screen.jpg);width:269px;height:164px;padding-top:20px;}#myScreen {width:228px;height:128px;margin-left:21px;}</style></head><body><div id="myScreen"></div><script type="text/javascript">var myScreen = document.getElementById('myScreen');var myPics = ['pic1.jpg','pic2.jpg','pic3.jpg'];var totalPics = myPics.length;var i = 0;function loop() {if(i > (totalPics - 1)){i = 0;}myScreen.innerHTML = '<img src="pic1.jpg">';i++;loopTimer = setTimeout('loop()',3000);}loop();</script></body></html>
×
×
  • Create New...