Skip to content

Instantly share code, notes, and snippets.

View zgr024's full-sized avatar

Zach Rosenberg zgr024

View GitHub Profile
@zgr024
zgr024 / ScrollToElementId
Created April 5, 2012 15:33
Scrolls to the element of your choice based on the id of the element and the $_GET[] parameter
<?
// PHP
if ($_GET['elementId']) {
?>
<input type="hidden" id="elementId" value="<?=$_GET['elementId']?>" />
<?
}
?>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>