PDA

View Full Version : Resolved Stop blinking image when new image is loaded



theremotedr
05-19-2015, 07:50 PM
Here is the page in question,
http://www.theremotedoctor.co.uk/karsuzuki.html?scrollto=selection

I have the main advert blinking upon page load which is correct.
You then make your selection & then the item image in question is then loaded.
This now loaded image needs to be just visible & not blinking.

Please advise what this newbie needs to do to correct the issue.

Thanks

jscheuer1
05-19-2015, 08:21 PM
<script type="text/javascript">
var url = 'http://form.jotformeu.com/form/50907214204344?partNumber=';

function replaceMainImage(imgSrc, partNumber, myContent) {
$('#content a').get(0).search = 'partNumber=' + partNumber;
$('#mainImage').attr('src', imgSrc).removeClass('blinking');
$('#mainImage').addClass('img-border');
$('html, body').animate({
scrollTop: $("#mainImage").offset().top
}, 1000);
$('.tooltip').tooltip

theremotedr
05-19-2015, 08:37 PM
Hi
This is from the code towards the bottom of the screen correct ?

If so i do not see blinking there ?


$('#content a').get(0).search = 'partNumber=' + partNumber;
$('#mainImage').attr('src', imgSrc)
$('#mainImage').addClass('img-border');
$('html, body').animate({
scrollTop: $("#mainImage").offset().top
}, 1000);

theremotedr
05-19-2015, 08:39 PM
Ha Ha

You mean add it

theremotedr
05-19-2015, 08:44 PM
Thanks.
This did the trick
$('#mainImage').attr('src', imgSrc).removeClass('blinkingshadow');

jscheuer1
05-19-2015, 11:11 PM
Almost there. Change:


<h1><img src="m-images/advert-suzuki.jpg" alt="remote doctor main logo" id="mainImage" class="blinkingshadow"/></h1>

To (add a space):


<h1><img src="m-images/advert-suzuki.jpg" alt="remote doctor main logo" id="mainImage" class="blinking shadow"/></h1>

Then change:


$('#mainImage').attr('src', imgSrc).removeClass('blinkingshadow');

to:


$('#mainImage').attr('src', imgSrc).removeClass('blinking');


That is if you want to keep the blinking at all. Two reasons why you should get rid of it:


Although you know very well where you are and that you cut keys and program remotes from that location, the average user of the site might not. Having that information blinking, may make it hard for some to read.
Even in the most recent version of some browsers, the blinking css you are using renders the image invisible, not for some.