Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    6
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Im a complete noob. Sorry in advance!

    how does he do this? where can i find a similar jquerry or javascript code (assuming that's what it is)

    the part where the picture changes when you hover over it on this site towards the bottom
    massliker.com

    sorry if this is not in the right section. please move if necessary. sorry!

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,149
    Thanks
    203
    Thanked 2,547 Times in 2,525 Posts
    Do please read the posting guidelines regarding silly thread titles. The thread title is supposed to help people who have a similar problem in future. Yours is useless for this purpose. You can (and should) edit it to make it more meaningful. And don't grovel!

    How does who do what? Please be clearer.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #3
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    6
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Philip M View Post
    Do please read the posting guidelines regarding silly thread titles. The thread title is supposed to help people who have a similar problem in future. Yours is useless for this purpose. You can (and should) edit it to make it more meaningful. And don't grovel!

    How does who do what? Please be clearer.
    i cant find the edit button anywhere
    Anyways, there's a link in the first post. towards the end of that webpage, you see pictures. hover your mouse over them and the picture "slides upward" i assume its a jquerry script.

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,149
    Thanks
    203
    Thanked 2,547 Times in 2,525 Posts
    Yes, I now realise that you are not able to edit your posts as you have fewer than 10 posts.

    I suggest you look at the many excellent scripts at

    http://www.vicsjavascripts.org.uk/

    But whether a "complete noob" will be able to understand them is moot. Are you trying to run before you can walk?
    Last edited by Philip M; 07-04-2013 at 08:26 AM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #5
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,522
    Thanks
    3
    Thanked 507 Times in 494 Posts
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
      <title></title>
    <style type="text/css">
    /*<![CDATA[*/
    .top {
      position:relative;overflow:hidden;left:100px;top:100px;width:200px;height:300px;border:solid red 1px;background-Color:#FFFFCC;float:left;margin-Left:10px;
    }
    
    .slide {
      position:absolute;z-Index:101;left:0px;top:0px;width:200px;height:300px;background-Color:#FFCC66;
    }
    
    /*]]>*/
    </style></head>
    
    <body>
    <div class="top" >
     <div class="slide" id="slide1" ></div>
    </div>
    <div class="top" >
     <div class="slide" id="slide2" ></div>
    </div>
    <div class="top" >
     <div class="slide" id="slide3" ></div>
    </div>
    <div class="top" >
     <div class="slide" id="slide4" ></div>
    </div>
    
    
    <script type="text/javascript">
    /*<![CDATA[*/
    // SlidePanel (04-July-2013)
    // by Vic Phillips - http://www.vicsjavascripts.org.uk/
    
    
    var zxcSlidePanel={
    
     init:function(o){
      var id=o.PanelID,m=o.Mode,ms=o.Animate,obj=document.getElementById(id),m=typeof(m)=='string'?m.charAt(0).toUpperCase():'U',p;
      if (obj){
       p=obj.parentNode;
       o.a=[obj,m=='L'||m=='R'?'left':'top',obj['offset'+(m=='L'||m=='R'?'Width':'Height')]*(m=='L'||m=='U'?-1:1),0];
       o.ms=typeof(ms)=='number'&&ms>0?ms:1000;
       this['zxc'+id]=o;
       this.addevt(p,'mouseover','Slide',id,true);
       this.addevt(p,'mouseout','Slide',id,false);
      }
     },
    
     Slide:function(id,ud){
      var o=this['zxc'+id],t=o&&ud?o.a[2]:0;
      if (o){
       this.animate(o,o.a,o.a[3],t,new Date(),o.ms*Math.abs((t-o.a[3])/o.a[2]));
      }
     },
    
     animate:function(o,a,f,t,srt,mS){
      clearTimeout(a[4]);
      var oop=this,ms=new Date()-srt,n=(t-f)/mS*ms+f;
      if (isFinite(n)){
       a[3]=n;
       a[0].style[a[1]]=n+'px';
      }
      if (ms<mS){
       a[4]=setTimeout(function(){ oop.animate(o,a,f,t,srt,mS); },10);
      }
      else {
       a[3]=t;
       a[0].style[a[1]]=t+'px';
      }
     },
    
     addevt:function(o,t,f,p,p1){
      var oop=this;
      o.addEventListener?o.addEventListener(t,function(e){ return oop[f](p,p1);},false):o.attachEvent?o.attachEvent('on'+t,function(e){ return oop[f](p,p1); }):null;
     }
    
    }
    
    
    zxcSlidePanel.init({
     PanelID:'slide1',  // the uniqie ID name of the slide DIV.                              (string)
     Mode:'up',         //(optional) the mode of sxecution, 'up', 'down', 'left' or 'right'. (string, default = 'up')
     Animate:1000       //(optional) the animation speed in milli seconds'.                  (number, default = 1000)
    });
    
    
    zxcSlidePanel.init({
     PanelID:'slide2',
     Mode:'down',
     Animate:500
    });
    
    zxcSlidePanel.init({
     PanelID:'slide3',
     Mode:'left',
     Animate:1000
    });
    
    zxcSlidePanel.init({
     PanelID:'slide4',
     Mode:'right',
     Animate:1000
    });
    
    /*]]>*/
    </script>
    
    </body>
    
    </html>
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/

  • Users who have thanked vwphillips for this post:

    noobybooby (07-04-2013)

  • #6
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    6
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by vwphillips View Post
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
      <title></title>
    <style type="text/css">
    /*<![CDATA[*/
    .top {
      position:relative;overflow:hidden;left:100px;top:100px;width:200px;height:300px;border:solid red 1px;background-Color:#FFFFCC;float:left;margin-Left:10px;
    }
    
    .slide {
      position:absolute;z-Index:101;left:0px;top:0px;width:200px;height:300px;background-Color:#FFCC66;
    }
    
    /*]]>*/
    </style></head>
    
    <body>
    <div class="top" >
     <div class="slide" id="slide1" ></div>
    </div>
    <div class="top" >
     <div class="slide" id="slide2" ></div>
    </div>
    <div class="top" >
     <div class="slide" id="slide3" ></div>
    </div>
    <div class="top" >
     <div class="slide" id="slide4" ></div>
    </div>
    
    
    <script type="text/javascript">
    /*<![CDATA[*/
    // SlidePanel (04-July-2013)
    // by Vic Phillips - http://www.vicsjavascripts.org.uk/
    
    
    var zxcSlidePanel={
    
     init:function(o){
      var id=o.PanelID,m=o.Mode,ms=o.Animate,obj=document.getElementById(id),m=typeof(m)=='string'?m.charAt(0).toUpperCase():'U',p;
      if (obj){
       p=obj.parentNode;
       o.a=[obj,m=='L'||m=='R'?'left':'top',obj['offset'+(m=='L'||m=='R'?'Width':'Height')]*(m=='L'||m=='U'?-1:1),0];
       o.ms=typeof(ms)=='number'&&ms>0?ms:1000;
       this['zxc'+id]=o;
       this.addevt(p,'mouseover','Slide',id,true);
       this.addevt(p,'mouseout','Slide',id,false);
      }
     },
    
     Slide:function(id,ud){
      var o=this['zxc'+id],t=o&&ud?o.a[2]:0;
      if (o){
       this.animate(o,o.a,o.a[3],t,new Date(),o.ms*Math.abs((t-o.a[3])/o.a[2]));
      }
     },
    
     animate:function(o,a,f,t,srt,mS){
      clearTimeout(a[4]);
      var oop=this,ms=new Date()-srt,n=(t-f)/mS*ms+f;
      if (isFinite(n)){
       a[3]=n;
       a[0].style[a[1]]=n+'px';
      }
      if (ms<mS){
       a[4]=setTimeout(function(){ oop.animate(o,a,f,t,srt,mS); },10);
      }
      else {
       a[3]=t;
       a[0].style[a[1]]=t+'px';
      }
     },
    
     addevt:function(o,t,f,p,p1){
      var oop=this;
      o.addEventListener?o.addEventListener(t,function(e){ return oop[f](p,p1);},false):o.attachEvent?o.attachEvent('on'+t,function(e){ return oop[f](p,p1); }):null;
     }
    
    }
    
    
    zxcSlidePanel.init({
     PanelID:'slide1',  // the uniqie ID name of the slide DIV.                              (string)
     Mode:'up',         //(optional) the mode of sxecution, 'up', 'down', 'left' or 'right'. (string, default = 'up')
     Animate:1000       //(optional) the animation speed in milli seconds'.                  (number, default = 1000)
    });
    
    
    zxcSlidePanel.init({
     PanelID:'slide2',
     Mode:'down',
     Animate:500
    });
    
    zxcSlidePanel.init({
     PanelID:'slide3',
     Mode:'left',
     Animate:1000
    });
    
    zxcSlidePanel.init({
     PanelID:'slide4',
     Mode:'right',
     Animate:1000
    });
    
    /*]]>*/
    </script>
    
    </body>
    
    </html>
    Im sorry for bothering you again, but how can i add a link to the image? I've tried everything without success...

  • #7
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    6
    Thanks
    5
    Thanked 0 Times in 0 Posts
    nvm i figured it out. please delete this along with my previous post, moderator. thank you.


  •  

    Posting Permissions

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