jQuery: Hacking Styling with ‘html’

I’m working in LibGuides today and jQuery is on my mind again. The beauty of Springshare’s LibGuides is that there are several options available to customize guides and groups to your heart’s content with CSS and JavaScript dependent upon experience.

Today’s hack: change some text and it’s link in the breadcrumbs section to reflect our museum’s homepage, rather than our library’s homepage, even though it is the library who is registered with LibGuides. See jQuery code below:

$(function(){
$('li#s-lib-bc-customer').html("<a href='http://museums.alaska.gov'>Alaska State Museums</a>");
});

All I had to do was place this code between opening and closing script tags in the “Guide Custom JS/CSS” settings box found at the top right-hand corner in edit view.

A beautifully simple and useful modification with jQuery!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s