On Wed, Oct 28, 2009 at 9:49 PM, Michael Beccaria
<[log in to unmask]>wrote:
> I should clarify. The most granular piece of information in the html is
> a "class" attribute (i.e. there is no "id"). Here is a snippet:
>
> <div class="SS_Holding" style="background-color: #CECECE">
> <!-- Journal Information -->
> <span class="SS_JournalTitle"><strong>Annals of forest
> science.</strong></span> <span
> class="SS_JournalISSN">(1286-4560)</span>
>
>
> I want to alter the "<span class="SS_JournalISSN">(1286-4560)</span>"
> section. Maybe add some html after the issn that tells whether it is
> peer reviewed or not.
>
>
Yes - you'd write code similar to this one:
$(document).ready(function () {
$("SS_JournalISSN").each(function () {
var issn = $(this).text().replace(/[^\dxX]/g, "");
var self = this;
$.getJSON("http:.... xissn.oclc.....issn=" + issn +
"....&format=json&callback=.", function (data) {
$(self).append( .... data ... [ 'is peer reviewed' ] );
});
});
});
- Godmar
|