User:Nessman/common.js

// working - links article heading to catalogue search var subj =$("#firstHeading span").text; $("#firstHeading span").html('' + subj + ''); // $("#firstHeading span").html('' + subj + '');

// rough //var searchURL = "Find in Sitka"; //$("#firstHeading span").append(searchURL); //$("#firstHeading span").text(searchURL);

// 1st attempt to display the RSS via straight JS

// var subj =$("#firstHeading span").text; // var FEED_URL = 'http://catalogue.libraries.coop/opac/extras/opensearch/1.1/-/rss2-full?searchOrg=SITKA&searchTerms=' + subj + '&searchClass=keyword';

// $.get(FEED_URL, function(data) { //   var $xml = $(data); //    $xml.find("item").each(function { //       var $this = $(this), //           item = { //               title: $this.find("title").text, //               link: $this.find("link").text, //              description: $this.find("description").text, //              pubDate: $this.find("pubDate").text, //              author: $this.find("author").text //       }        //Do something with item here... //       $("#See_also").append(item); //   }); // });