1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

need help with javascript in wordpress

Discussion in 'Hire a Freelancer' started by specopkirbs, Jul 18, 2010.

  1. specopkirbs

    specopkirbs BANNED BANNED

    Joined:
    Nov 28, 2008
    Messages:
    920
    Likes Received:
    746
    i was given some javascript code from someone here to add to my wordpress site and when i first posted it it worked fine however i edited my sidebar in wordpress and now the code wont work no matter what, all i did was add some other widgets.
    i need to have this js working in the sidebar.
    if you can help ill throw a few dollars your wat

    Code:
    <div style="width:433px; height:29; font-size:18;font-family: arial; color: white;">
    <script type="text/javascript">
    //set up Time & Date variables for the current Day & Hour
    var myDate = new Date() // returns full date
    var today = myDate.getDay() //returns 1-7 (1 being monday)
    var message = ''
    switch(today)
    {
    case 1:  //monday
        message = 'Tomorrow 1900 hrs to 2000 hrs at Boston Road Park Sleaford' 
        break;
    case 2:  //tuesday
        message = 'Tonight 1900 hrs to 2000 hrs at Boston Road Park Sleaford'  
        break;
    case 3: //wed
        message = 'Tomorrow 1900 hrs to 2000 hrs at Boston Road Park Sleaford'  
        break;
    case 4: //thurs
        message = 'Tonight 1900 hrs to 2000 hrs at Boston Road Park Sleaford'  
        break;
    case 5:  //friday
        message = 'Tuesday 1900 hrs to 2000 hrs at Boston Road Park Sleaford' 
        break;
    case 6:  //saturday
        message = 'Tuesday 1900 hrs to 2000 hrs at Boston Road Park Sleaford' 
        break;
    case 7:  //sunday
        message = 'Tuesday 1900 hrs to 2000 hrs at Boston Road Park Sleaford' 
        break;
    }
    
    document.write('<marquee behavior="scroll" direction="left">' + message + '</marquee>');
    
    </script>
    </div>
     
  2. Rajthepositivelife

    Rajthepositivelife Elite Member Premium Member

    Joined:
    Feb 9, 2010
    Messages:
    1,786
    Likes Received:
    441
    Occupation:
    Director
    Location:
    India
    Home Page:
    Hey,

    I can try doing the job for you. Send me a pm about the website on which this needs to be done.