Created
October 16, 2013 08:38
-
-
Save baldwicc/7004567 to your computer and use it in GitHub Desktop.
Clickable Content Item Icons: Borrows the hyperlink from the content item title, clones it and wraps it around the content item's icon.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" id="qut-clickyicons"> | |
Event.observe(document,"dom:loaded", function() { | |
var contentitem_title_hyperlinks = $$('#content_listContainer > li > .item > h3 > a[href^="/webapps"]'); | |
for (var i = 0; i < contentitem_title_hyperlinks.length; i++) { | |
var thislink = contentitem_title_hyperlinks[i]; | |
var contentitem_icon = thislink.up('.item').previous('img.item_icon'); | |
var newlink = thislink.clone(false); | |
contentitem_icon.wrap(newlink); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment