Results 1 to 2 of 2

Thread: request help with applying Neon Lights Text II effect to selected tab in Ajax Tabs Co

  1. #1
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default request help with applying Neon Lights Text II effect to selected tab in Ajax Tabs Co

    request help with applying Neon Lights Text II effect to selected tab in Ajax Tabs Content Script (v 2.2)

    1. Script Titles: Neon Lights Text II and Ajax Tabs Content Script (v 2.2)
    2. URLs:
    Neon Lights Text II: http://www.dynamicdrive.com/dynamici.../neontext2.htm
    Ajax Tabs Content Script: http://www.dynamicdrive.com/dynamici...tent/index.htm

    3. I am trying to apply Neon Lights Text effect to selected tab in Ajax Tabs Content Script.

    My current codes (see below) apply Neon Lights to selected tab after loading page, but if I select another tab I need to reload page to see Neon Lights on a new tab.

    Any help or ideas are welcome!
    Here is my current codes:
    Code:
    // Ajax Tabs Content Script – working fine:
    <ul id="countrytabs" class="modernbricksmenu">
    <li><a href="external.php" class="selected" rel="#default">Tab 1</a></li>
    <li><a href="external2.php" rel="countrycontainer">Tab 2</a></li>
    <li><a href="external3.php" rel="countrycontainer">Tab 3</a></li>
    <li><a href="http://www.dynamicdrive.com">Dynamic Drive</a></li>
    </ul>
    <div id="countrydivcontainer" style="smallblack"></div>
    
    <script type="text/javascript">
     var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
     countries.setpersist(true)
     countries.setselectedClassTarget("link")
     countries.init()
     </script>
    
    // Neon Lights Text: original lines are //
    
    //var message="Thank you for visiting Dynamic Drive!"
    var message= countrytabs.tabs[countrytabs.currentTabIndex].innerHTML //my modification
    var neonbasecolor="gray"
    var neontextcolor="yellow"
    var neontextcolor2="#FFFFA8"
    var flashspeed=100
    var flashingletters=3
    var flashingletters2=1
    var flashpause=0
    var tabtext="" //my modification
    
    var n=0
    if (document.all||document.getElementById){
    
    //document.write('<font color="'+neonbasecolor+'">')
    tabtext='<font color="'+neonbasecolor+'">' // my modification
    
    for (m=0;m<message.length;m++)
    
    //document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')
    tabtext=tabtext+'<span id="neonlight'+m+'">'+message.charAt(m)+'</span>'  // my modification
    
    //document.write('</font>')
    tabtext=tabtext+'</font>'  // my modification
    countrytabs.tabs[countrytabs.currentTabIndex].innerHTML=tabtext
    }
    else
    //document.write(message)
    
    function crossref(number){
    var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)
    return crossobj
    }
    
    function neon(){
    
    if (n==0){
    for (m=0;m<message.length;m++)
    crossref(m).style.color=neonbasecolor
    }
    
    crossref(n).style.color=neontextcolor
    
    if (n>flashingletters-1) crossref(n-flashingletters).style.color=neontextcolor2 
    if (n>(flashingletters+flashingletters2)-1) crossref(n-flashingletters-flashingletters2).style.color=neonbasecolor
    
    
    if (n<message.length-1)
    n++
    else{
    n=0
    clearInterval(flashing)
    setTimeout("beginneon()",flashpause)
    return
    }
    }
    
    function beginneon(){
    if (document.all||document.getElementById)
    flashing=setInterval("neon()",flashspeed)
    }
    beginneon()
    </script>
    Best wishes and Happy New Year!

    Oleg

  2. #2
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK, the problem is solved.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •