fixed cross browser compatibility issue
This commit is contained in:
parent
43db4d7416
commit
39590ec936
1 changed files with 6 additions and 1 deletions
|
@ -48,12 +48,15 @@ var browseByVClass = {
|
|||
return false;
|
||||
});
|
||||
|
||||
// save the selected vclass in location hash so we can reset the selection
|
||||
// if the user navigates with the back button
|
||||
this.browseVClasses.children('li').each( function() {
|
||||
$(this).find('a').click(function () {
|
||||
// the extra space is needed to prevent odd scrolling behavior
|
||||
location.hash = $(this).attr('data-uri') + ' ';
|
||||
});
|
||||
});
|
||||
|
||||
// Call the pagination listener
|
||||
this.paginationListener();
|
||||
},
|
||||
|
@ -73,7 +76,9 @@ var browseByVClass = {
|
|||
defaultVClass: function() {
|
||||
if ( this.defaultBrowseVClassURI != "false" ) {
|
||||
if ( location.hash ) {
|
||||
this.getIndividuals(location.hash.substring(1,location.hash.length - 1), "all", 1, false);
|
||||
// remove the trailing white space
|
||||
location.hash = location.hash.replace(/\s+/g, '');
|
||||
this.getIndividuals(location.hash.substring(1,location.hash.length), "all", 1, false);
|
||||
}
|
||||
else {
|
||||
this.getIndividuals(this.defaultBrowseVClassUri, "all", 1, false);
|
||||
|
|
Loading…
Add table
Reference in a new issue