Changeset 496285
- Timestamp:
- 01/27/2012 08:45:04 PM (14 years ago)
- Location:
- countdown/trunk
- Files:
-
- 2 edited
-
countdown.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
countdown/trunk/countdown.php
r496279 r496285 4 4 Plugin URI: http://studio.bloafer.com/wordpress-plugins/countdown/ 5 5 Description: Use the shortcode [countdown] to create a countdown system. 6 Version: 0. 16 Version: 0.2 7 7 Author: Kerry James 8 8 Author URI: http://studio.bloafer.com/ … … 37 37 delete dateNow; 38 38 if(amount < 0){ 39 $("#<?php print $randID ?> .days .number").html("0");40 $("#<?php print $randID ?> .hour .number").html("0");41 $("#<?php print $randID ?> .mins .number").html("0");42 $("#<?php print $randID ?> .secs .number").html("0");39 jQuery("#<?php print $randID ?> .days .number").html("0"); 40 jQuery("#<?php print $randID ?> .hour .number").html("0"); 41 jQuery("#<?php print $randID ?> .mins .number").html("0"); 42 jQuery("#<?php print $randID ?> .secs .number").html("0"); 43 43 }else{ 44 44 days = 0; … … 54 54 amount = amount % 60; 55 55 secs = Math.floor(amount); 56 if( $("#<?php print $randID ?> .days .number").html()!=days){57 $("#<?php print $randID ?> .days .number").html(days);56 if(jQuery("#<?php print $randID ?> .days .number").html()!=days){ 57 jQuery("#<?php print $randID ?> .days .number").html(days); 58 58 } 59 if( $("#<?php print $randID ?> .hour .number").html()!=hours){60 $("#<?php print $randID ?> .hour .number").html(hours);59 if(jQuery("#<?php print $randID ?> .hour .number").html()!=hours){ 60 jQuery("#<?php print $randID ?> .hour .number").html(hours); 61 61 } 62 if( $("#<?php print $randID ?> .mins .number").html()!=mins){63 $("#<?php print $randID ?> .mins .number").html(mins);62 if(jQuery("#<?php print $randID ?> .mins .number").html()!=mins){ 63 jQuery("#<?php print $randID ?> .mins .number").html(mins); 64 64 } 65 if( $("#<?php print $randID ?> .secs .number").html()!=secs){66 $("#<?php print $randID ?> .secs .number").html(secs);65 if(jQuery("#<?php print $randID ?> .secs .number").html()!=secs){ 66 jQuery("#<?php print $randID ?> .secs .number").html(secs); 67 67 } 68 68 69 if(days==0){ $("#<?php print $randID ?> .days").hide(); }69 if(days==0){ jQuery("#<?php print $randID ?> .days").hide(); } 70 70 71 71 setTimeout("count<?php print $randID ?>timer()", 1000); 72 72 } 73 73 } 74 $(document).ready(function(){74 jQuery(document).ready(function(){ 75 75 var holder_stuff = '<span class="number"></span><span class="over"></span><span class="title"></span>'; 76 var holder_days = $("<span>").addClass("days").addClass("item").html(holder_stuff);77 var holder_hour = $("<span>").addClass("hour").addClass("item").html(holder_stuff);78 var holder_mins = $("<span>").addClass("mins").addClass("item").html(holder_stuff);79 var holder_secs = $("<span>").addClass("secs").addClass("item").html(holder_stuff);80 $("#<?php print $randID ?>").html("").append(holder_days).append(holder_hour).append(holder_mins).append(holder_secs);76 var holder_days = jQuery("<span>").addClass("days").addClass("item").html(holder_stuff); 77 var holder_hour = jQuery("<span>").addClass("hour").addClass("item").html(holder_stuff); 78 var holder_mins = jQuery("<span>").addClass("mins").addClass("item").html(holder_stuff); 79 var holder_secs = jQuery("<span>").addClass("secs").addClass("item").html(holder_stuff); 80 jQuery("#<?php print $randID ?>").html("").append(holder_days).append(holder_hour).append(holder_mins).append(holder_secs); 81 81 count<?php print $randID ?>timer(); 82 82 }); … … 92 92 add_shortcode('countdown', 'countdown_shortcode_handler'); 93 93 94 function countdown_wp_enqueue_scripts(){ 95 wp_enqueue_script('jquery'); 96 } 97 add_action('wp_enqueue_scripts', 'countdown_wp_enqueue_scripts'); 98 94 99 ?> -
countdown/trunk/readme.txt
r496279 r496285 2 2 Plugin Name: Countdown 3 3 Plugin URI: http://studio.bloafer.com/wordpress-plugins/countdown/ 4 Description: Use the shortcode [countdown] to create a countdown system.5 Version: 0. 14 Description: This plugin adds a shortcode [countdown] to WP allowing you to place a countdown timer on your page. 5 Version: 0.2 6 6 Author: Kerry James 7 7 Author URI: http://studio.bloafer.com/ … … 26 26 27 27 == Changelog == 28 = 0.2 = 29 * jQuery Issues Fixed 28 30 = 0.1 = 29 31 * Initial Release
Note: See TracChangeset
for help on using the changeset viewer.