Skip to content

Instantly share code, notes, and snippets.

@heyfletch
Created August 29, 2013 19:55
Show Gist options
  • Save heyfletch/6382670 to your computer and use it in GitHub Desktop.
Save heyfletch/6382670 to your computer and use it in GitHub Desktop.
Highlight another element when clicking a certain hyperlink or element
<a class="highlight" href="#myIDorClass">AnchorText</a>
<script>
jQuery(".highlight").on("click", function(){
jQuery("#myIDorClass").css({'background':'yellow'});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment