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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Cant get js slide to expand to fit more content

    Hi!
    My client has contacted me 2 years after building their site:
    http://www.broomedaycare.com/reviews.html#4

    to add more testimonials to this script.

    The site is using slides.min.jquery.js" and "hoverIntent.js".

    One of the new testimonials is quite long and would not fit in the previously designed allocated space. I uploaded a new background that was higher to cater for the additional text and gave the testimonial div and then the class "headline" more height and tried changing the values in the script and have generally been mucking around with it for over an hour trying to get it to work!

    Now I have set everything back to the way it was except for I have added the extra testimonials in the html.

    I would really appreciate some-one who knows javascript to have a look at this for me. Thanks a zillion!

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,466
    Thanks
    3
    Thanked 495 Times in 482 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>
    <link href="http://www.broomedaycare.com/css/styles.cssk" rel="stylesheet" type="text/css" />
    <style type="text/css">
    /*<![CDATA[*/
    /* CSS Document */
    
    /*Testimonial Page*/
    
    #Testimonials {
    	position: relative;
    	background:url(../images/TestimonialFrame.jpg) no-repeat;
    	overflow: hidden;
    	border: 4px solid #ccc;
        height: 150px;
        width:420px;
     }
    
    #Testimonials p {
    	padding: 0 3em;
    	color:#000;}
    
    
    .headline {
        top: 0px;
        left: 5px;
        width:420px;
    	margin:0 auto;
        margin-bottom:50px;
        }
    
    
    /*]]>*/
    </style></head>
    
    <body>
    
    <div id="Testimonials">
    
    
    <div class="headline">
     	<h3>Kyeema Albert</h3>
    	<p>Tom and Barb have a fantastic Centre that is warm and homely.  The Centre is clean and my children love to spend time here.</p>
        <p>My sons love the fact that Tom is here and he is fun to be with.  He is also the best cook around!  He has got my children eating everything.</p>
        <p>Barb has so much knowledge and she is able to advise me about teething; sleeping; toileting and basically anything you need to know.  Thanks very much Tom and Barb keep up the excellent work.</p>
    </div>
    
    <div class="headline">
     	<h3>Nancy Andrews</h3>
    	<p>"This is one of the best day cares in the region if you want to see your child growing and learning something useful, and get the motherly care this is the place you should send him to."</p>
    </div>
    
    <div class="headline">
     	<h3>Karleen Wilson</h3>
    	<p>The girls always have a smile on their face.  The kids always have great activities every day; the Toddler Room always presents so well and the creativity is fantastic!  The girls are always very informative on the day's events.  Thank you for helping Ry and myself so very much.</p>
    </div>
    
    <div class="headline">
     	<h3>Uweinna Albert</h3>
    	<p>The girls in the Babies Room are fantastic!  They have a very clean and welcoming room.  The colour and activities that are set out are well thought out and I know my child is receiving the right stimulation and care to help him to grow and develop.</p>
    </div>
    
    <div class="headline">
     	<h3>Kelly Dodd</h3>
    	<p>Thanks Tom and Barb.  I have had all my kids go to your Centre and I am so glad they have had the same two people there for them.  Zane will miss you.</p>
    </div>
    
    <div class="headline">
     	<h3>Sanchia Shibasaki</h3>
    	<p>Broome Daycare Centre is owned and operated by Tom and Barbara Johnston.  Unlike several of the day care centre’s we initially tried in Broome, the Broome Day Care Centre is like a home away from home.</p>
        <p>The Indoor and outdoor settings are bright, colourful, attractive and clean.  The Staff are welcoming and friendly, approachable and understanding.</p>
        <p>There are lots of resources for the children to use and play with.  Everything is well looked after. </p>
    </div>
    
    <div class="headline">
     	<h3>Rachael Christiansen</h3>
    	<p>The Centre always smells lovely; in the morning I like to find out what is for lunch because it smells wonderful.</p>
        <p>Tom always asks me to come in for lunch.  And in the afternoon it always smells clean (the Centre is being cleaned at the end of the day).</p>
        <p>Everyone is very supportive and they really love Aaliyah. </p>
    </div>
    
    <div class="headline">
     	<h3>Caroline Bartlett</h3>
    	<p>Broome Daycare Centre is the best Centre put your child into.  The Centre has so much equipment for Caitlin to play with.   Caitlin is very happy and she has made lots of friends and so have I.</p>
        <p>The baby’s play room is big and roomy and there is a separate cot room and a sleep room for the babies.  My baby son will love coming to Broome Daycare next year.</p>
        <p>Caitlin will be in the Pre-School room and she will learn lots with the EYLF which the carers have incorporated Letterland, numeracy, cognitive, fine motor and gross motor activities for Caitlin to develop and grow with.</p>
    </div>
    
    <div class="headline">
     	<h3>Hayley & Brendan Nauta</h3>
     <!--   <h2>September 2013</h2>-->
    	<p>I would just like to say how blessed we feel having had our kids cared for at Broome Daycare.</p>
        <p>I've never found it particularly easy to leave my precious cargo with people who don't love them as much as I do! I love to spend time with my kids and haven't always felt naturally ok to leave them at day care.</p>
        <p>But, since attending Broome Daycare I have had no concerns, the children absolutely love it and have flourished in your care. Thank you so very much for taking the time to employ staff who are not only friendly, understanding and dedicated; but also genuinely interested in seeing our kids grow to be the best little people they can be. It brings tears to my eyes knowing that those who work there, have invested the time into Lucas & Emily and actually do take just as good care of them as we do!</p>
    
    <p> When we first came to town the children started at a different day care centre and whilst nothing dreadful happened there, I never felt that enough time or care was invested in the children.</p>
    
    <p>It was much more business-like, with young carers just there for the money and not a lot of personal interaction with the parents of the children in care. Broome Daycare is a fantastically run business but feels so much more like family and a much happier environment to leave our children in. Honestly, if I could take Broome Daycare and the wonderful staff with me to Perth, I would!</p>
    <p>Thank you!</p>
    </div>
    
    <div class="headline">
     	<h3>Angela and Alistair Crowe</h3>
        <!--<h2>September 2013</h2>-->
    <p>Tom, Barbara and the girls at Broome Daycare Centre have been wonderful.  Their ongoing support and care has been unforgettable.</p>
    <p>I would recommend them to anyone considering a day care centre here in Broome.  Great Family Run Day Care!</p>
    </div>
    
    <div class="headline">
     	<h3>Kellie MacNicol</h3>
       <!-- <h2>September 2013</h2>-->
    <p>We have been more than happy with the centre from day one. Barb and her staff are always welcoming, friendly and professional.</p>
    <p>The rooms are bright and inviting, whilst also being clean and fresh. Lucy loves going to day care and we are content in the knowledge that the staff enjoy looking after her.</p> <p>We know that she is spending the day in a stimulating and nurturing environment. We would certainly recommend Broome Daycare to any family.</p>
    </div>
    
    </div><!--END of Testimonials-->
    
    <script type="text/javascript">
    /*<![CDATA[*/
    // Testimonials Slide Scroll (23-September-2013)
    // by Vic Phillips - http://www.vicsjavascripts.org.uk/
    
    
    var zxcTestimonials={
    
     Auto:function(id,ms){
      var o=this['zxc'+id],oop=this;
      o?o.to=setTimeout(function(){ oop.slide(o,true,true); },ms||500):null;
     },
    
     Pause:function(id){
      var o=this['zxc'+id];
      if (o){
       clearTimeout(o.to);
       o.auto=false;
      }
     },
    
     init:function(o){
      var id=o.ParentID,ms=o.Animate,hold=o.AutoHold,s=o.AutoStart,p=document.getElementById(id);
      if (p){
       var clds=p.childNodes,h=parseInt(this.style(p,'height')),ary=[],z0=0;
       for (;z0<clds.length;z0++){
        if (clds[z0].nodeType==1){
         clds[z0].style.position='absolute';
         clds[z0].style.top=h+'px';
         ary.push([clds[z0],clds[z0].offsetHeight,h]);
        }
       }
       o.id=id;
       o.p=p;
       o.ary=ary;
       o.lgth=ary.length-1;
       o.ms=typeof(ms)=='number'&&ms>20?ms:1000;
       o.hold=typeof(hold)=='number'&&hold>20?hold:o.ms*4;
       o.h=h;
       o.n=0;
       o.auto=false;
       this.addevt(p,'mouseover','Pause',id);
       this.addevt(p,'mouseout','Auto',id);
       this.addevt(p,'mousemove','scroll',o);
       this['zxc'+id]=o;
       typeof(s)=='number'&&s>20?this.Auto(id,s):null;
      }
     },
    
     slide:function(o,ud,a){
      clearTimeout(o.to);
      var n=o.n;
      ud?o.auto=a===true:null;
      this.animate(o,o.ary[n],o.ary[n][2],ud?o.h:0,new Date(),o.ms,ud);
      ud?n=o.auto?++n&o.ary.length:o.ary[a]?a:null:null;
      n=n<0?o.lgth:n>o.lgth?0:n;
      o.n=n;
     },
    
     animate:function(o,a,f,t,srt,mS,ud){
      clearTimeout(a[4]);
      var oop=this,ms=new Date()-srt,n=(t-f)/mS*ms+f;
      if (isFinite(n)){
       a[2]=n;
       a[0].style.top=n+'px';
      }
      if (ms<mS){
       a[4]=setTimeout(function(){ oop.animate(o,a,f,t,srt,mS,ud); },10);
      }
      else {
       a[2]=t;
       a[0].style.top=t+'px';
       if (typeof(ud)=='boolean'){
        ud?this.slide(o,false,false):null;
        !ud&&o.auto?oop.Auto(o.id,o.hold):null;
       }
      }
     },
    
     style:function(o,p){
      return o.currentStyle?o.currentStyle[p.replace(/-/g,'')]:document.defaultView.getComputedStyle(o,null).getPropertyValue(p.toLowerCase());
     },
    
     scroll:function(o,a,e){
      var a=o.ary[o.n],p=this.pos(o.p),mse=window.event?e.clientY+(!document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop):e.pageY;
      if (a[1]>o.h){
       a[2]=(-a[1]+o.h-10)*(mse-p)/o.h+10;
       a[0].style.top=a[2]+'px';
      }
     },
    
     pos:function(obj){
      var rtn=0;
      while(obj){
       rtn+=obj.offsetLeft;
       obj=obj.offsetParent;
      }
      return rtn;
     },
    
     mse:function(e){
       return window.event?e.clientY+(!document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop):e.pageY;
      if (window.event){
       var docs=!document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;
       return e.clientY+(!document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
      }
      return e.pageY;
     },
    
    // var e=window.event||arguments.callee.caller.arguments[0]
    
     addevt:function(o,t,f,p,p1){
      var oop=this;
      o.addEventListener?o.addEventListener(t,function(e){ return oop[f](p,p1,e);},false):o.attachEvent?o.attachEvent('on'+t,function(e){ return oop[f](p,p1,e); }):null;
     }
    
    
    
    }
    
    zxcTestimonials.init({
     ParentID:'Testimonials', // the unique ID name of the parent DIV.                   (string)
     Animate:1000,            //(option) the animation duration in milli seconds.        (number, default = 1000)
     AutoHold:2000,           //(option) the auto rotation delay in milli seconds.       (number, default = Animate*4)
     AutoStart:2000           //(option) the auto rotation start delay in milli seconds. (number, default = no auto start)
    });
    /*]]>*/
    </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/

  • #3
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Thanks so much for your post.

    I copied and pasted your javascript code in the reviews.html

    Altered the css by changing the background image and adding more height to the class headline.

    I have had to put everything back as it was because as you can see from the screenshot, everything was a mess.





    Did I miss a step? As there were no instructions in your post. I would be happy to give you a small donation for fixing this


  •  

    Posting Permissions

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