17-5-2012
JavaScript
<script type="text/javascript">
function getSeconds() {
var now = new Date();
var time = now.getTime();
var midnight = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0);
var ft = midnight.getTime() + 86400000;
var diff = ft – time;
diff = parseInt(diff / 1000);
if (diff > 86400) {
diff = diff – 86400
}
startTimer(diff);
}
var timeI ..
Read more
16-5-2012
HTML example
<h2 class="myClass" id="trigger1">Click here to expand</h2>
<div class="hide-container">
<p>Here goes whatever you want to expand/collapse</p>
<p>Here goes whatever you want to expand/collapse</p>
<p>Here goes whatever you want to expand/collapse</p>
<p>Here goes whatever you want to expand/collapse</p>
</div>
CSS
.myClass {font-size:20px; color: #FF0000;}
div#hide- ..
Read more
02-11-2011
<script type="text/javascript">
$(document).ready(function(){
$("#Select").change(function(){
if ($(this).val() == "Other" ) {
$("#OtherField").show();
} else {
$("#OtherField").hide();
}
});
});
</script> ..
Read more
27-10-2011
If you want to change your website's default text highlight color with any color of your choice, you can use the CSS3 declaration " ::selection" , which will replace your browser-level default text highlight color with a color that better suits your design.
See the example below with a RED for the background and WHITE for the text.
/* Firefox */
::-moz-selection {
background-color: #FF0000;
color: #fff;
}
/* Safari */
::selection {
background-color: ..
Read more