Website url: https://members.luscious.net/ What I am trying to achieve is to make a script which would automatically get a src attribute of an image that is currently showing on screen (from a plugin loader) so as the images apper on the screen, the href of the link would be changing to the source, i make a code so far work but only at scrolling to the bottom, i tride add buttom on top etc. but not working... (using greasemonkey pass trought)...
var $lc = jQuery.noConflict();
var tittle = $lc('#single_album_details li.album_cover h2').html();
tittle = titulo.toLowerCase().replace(/\b[a-z]/g, function(letter) {
return letter.toUpperCase();
});
$lc(window).scroll(function() {
if($lc(window).scrollTop() + $lc(window).height() == $lc(document).height()) {
$lc('div[id^="picture_"] a img').each(function() {
var Checker = $lc(this).attr('state');
if(Checker !== 'undefined' && Checker !== 'ok'){
var srcA= $lc(this).attr('src').replace(/\.(?=[^.]*$)/,'»');
var srcB = srcA.replace(/\.(?=[^.]*$)/,'»');
var srcC = srcB.replace(/\».+\»/,'.');
$lc(this).parent().attr('href',srcC);
$lc(this).attr('state','ok');
$lc(this).attr('alt',tittle);
}
});
}
});