Jump to content

Acolyte

New Members
  • Posts

    3
  • Joined

Acolyte's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I was considering this site as part of the tools I could use to complete the job. It's just a simple snippet. I've worked with code in the past and have been successful, it's just that I'm having a problem working this one out. This is a bit strange. Other forums just help without this judgment. Perhaps I've come to the wrong forum. Thank you.
  2. a. It seems to work on this site: lawyerspiprogram.com. I however, can't get the code to run on I site they asked me to put together. b. I'm not certain about the "isn't our code" comment. Does it have to be? Because I was tasked to put a site together and this code snippet is part of the job. I came here for a bit of guidance. Do I have to be a coder? Has this post offended for some reason? This isn't the friendliest of welcomes.
  3. Hey all, This code was given to me by my client who swears it works, yet I can't seem to get it to function. I'm only basically knowledgeable regarding coding. But as I understand, it's in two parts, where variables are declared in the php portion, which are then used in the javascript snippet. The code is simply supposed to display a number that updates daily. Any help is greatly appreciated. <?php $now = time(); // or your date as well $your_date = strtotime("2016-06-01"); $datediff = $now - $your_date; $referrals = number_format(162250 + (floor($datediff/(60*60*24)) * 527) + (87920 + (floor($datediff/(60*60*24)) * 45))); ?> //javascript: <script> //vars from template var referrals = "<?php echo $referrals;?>"; var currentdate = new Date(); jQuery("document").ready(function() { jQuery ("#sp-menu > div > nav > ul > li:nth-child(1) > a").html("Home"); jQuery(".referrals").html(referrals); jQuery(".current_date").html((currentdate.getMonth()+1) + "/" + currentdate.getDate() + "/" + currentdate.getFullYear()); jQuery(window).on("scroll", function() { var scrollPos = jQuery(window).scrollTop(); if (scrollPos <= 0) { jQuery(".counter").fadeIn(); jQuery(".sec-nav").fadeIn(); } else { jQuery(".counter").fadeOut(); jQuery(".sec-nav").fadeOut(); } }); }); </script>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.