M2vH / galleriffic

Automatically exported from code.google.com/p/galleriffic
0 stars 0 forks source link

next / previous link should also work on hover (mouseover) #253

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Is it possible to fire the next / previous links also with a hover-event?

I tried this one on the "next"-link but without any success.

// Rebuilds the pager control in the specified matched element.
// @param {jQuery} pager A jQuery element set matching the particular pager to 
be rebuilt.

buildPager: function(pager) {

// ...

// Next Page Link --> switch between sign and text/sign
var nextPage = startIndex + this.numThumbs;
if (nextPage < this.data.length) {
  if((nextPage-this.numThumbs) == 0) {
    nextPageText = this.nextPageLinkText; // "more >>" -> set on beginning of this lib
  }
  else {
    nextPageText = this.nextPageLinkSign; // ">>" -> set on beginning of this lib
  }

  var nextPageLink  = "#"+this.data[nextPage].hash;
  var mouseOverLink = nextPageLink;
    pager.append('<a rel="history" href="'+nextPageLink+'" title="'+nextPageText+'" onmouseover="window.location.href=\''+mouseOverLink+'\';">'+nextPageText+'</a>');
}

}

Original issue reported on code.google.com by stefan.b...@gmail.com on 27 Oct 2011 at 9:37