Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 2 of 2 FirstFirst 1 2
Results 11 to 14 of 14
Like Tree2Likes

Thread: Flashing image, two classes

  1. #11
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    It's hard to write code here on the forum, because there's no syntax highlighting. I made an error in javascript.

    Try this in place of the javascript:
    HTML Code:
    <style>
    window.addEventListener('load', function(){
    let blinky = document.querySelectorAll('.blink');
    
    for(let i = 0; i < blinky.length; i++){
      blinky[i].setInterval(function(){
        if(blinky[i].classList.contains('hidden')){
          blinky[i].classList.remove('hidden);
        } else {
          blinky[i].classList.add('hidden');
        }
      }, 1300);
    }
    });
    </script>
    Last edited by Ronald Roe; Jan 27th, 2018 at 04:48 AM.
    ipbr21054 likes this.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  2.  

  3. #12
    Member
    Join Date
    Mar 2016
    Location
    South west uk
    Posts
    81
    Member #
    53465
    Liked
    3 times
    Thanks,
    There is no syntax message etc.
    I have tried the suggested code but still no joy.
    I have left it in place and have shared the file as you mentioned hard to write code etc.

    In the file you will see 2 blink scripts,if its easier one of them worked fine apart from a slight visual glitch on the iphone.

    This might be easier than starting from scratch etc.

    Thanks for your time.


    Z THE ATTIC

  4. #13
    Member
    Join Date
    Mar 2016
    Location
    South west uk
    Posts
    81
    Member #
    53465
    Liked
    3 times
    Hi,
    This code below seems to work ok.
    I am just checking it out.


    Code:
            <script>
            function blinker() {
    	    $('.blinking').fadeOut(500);
    	    $('.blinking').fadeIn(500);
            }
            setInterval(blinker, 2000);
            </script>

  5. #14
    Member
    Join Date
    Mar 2016
    Location
    South west uk
    Posts
    81
    Member #
    53465
    Liked
    3 times
    The below script works fine.
    Many thanks for your guidance so i could complete this request.

    have a nice day.


Page 2 of 2 FirstFirst 1 2

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:50 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com