// The div #fader will fade in on load
<style type="text/javascript" />
$(function(){
$('#fader').hide();
$('#fader').fadeIn()
});
});
</script>
// The div #fader will fade in when clicked
<style type="text/javascript" />
$(function(){
$('#fader').click(function(){
$('#fader').fadeIn()
});
});
</script>
// The div a#fader will fade in when clicked. use return false for anchor tags
<style type="text/javascript" />
$(function(){
$('a#fader').click(function(){
$('#fader').fadeIn()
return false;
});
});
</script>
//Save the context in a var
var $main = $("#mainContent");
//If the container exists
if($(".ngg-albumoverview").length){
//Loop through each image, including the index of the object(i)
$(".ngg-album", $main).each(function(i){
//Since 0 based add one, for every 3rd object remainder will equal 0
var remainder = (i + 1) % 3;
//Add a class of last when the remainder is 0
if(remainder === 0){
$(this).addClass("last");
}
});
}
$(function(){
console.info("Start Test");
var d = new Date();//Get our start time
console.info(d.getSeconds() + " " + d.getMilliseconds());
//Run our test
var testBody = "";
for (var i=0; i<1000; i++){
testBody += "<div class='testable"+i+"'>";
}
$("body").append(testBody);
for (var j=0; j<1000; j++){
$(".testable"+j);
}
var d = new Date();//Get our end time
console.info(d.getSeconds() + " " + d.getMilliseconds());
console.info("End Test");
/**
* Console will now log 2 times, the difference between
* them is how long the test took to run
*/
});