Monday, April 2, 2012

Icon Rollover using jQuery in SharePoint 2010

1)Add a CQWP on the sharepoint page.
2)Open SPD2010
3)Edit it with the following code...

$(document).ready(function() {
$("img.rollover").hover(
function() { this.src = this.src.replace("_UP", "_OVER");});
$("img.rollover").mouseout(
function() { this.src = this.src.replace("_OVER", "_UP");});

});

Save it and refresh the page on the browser.
UseFul link:
http://kaidez.com/tutorial-simple-effective-jquery-image-rollover/