CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript programming (http://www.codingforums.com/forumdisplay.php?f=2)
-   -   How to style this javascript - is it possible? (http://www.codingforums.com/showthread.php?t=286997)

listerdl 02-04-2013 03:20 AM

How to style this javascript - is it possible?
 
OK this is a line of javascript which is "Live Chat" feature. It works great and the style matches 100% the rest of the page design and font etc.

However - what I am trying to do is change the color of this javascript live chat link in the navigation.

So the question is - can I manually (in-line) change the font color of this following javascript code?

Here it is:

Code:

        <!-- BEGIN ProvideSupport.com Text Chat Link Code -->
<div id="sjkdUia" style="z-index:100;position:absolute"></div><div id="sjkdUia" style="display:inline"></div><div id="sjkdUia" style="display:none"></div><script type="text/javascript">var sjkdUia=document.createElement("script");sjkdUia.type="text/javascript";var sjkdUia=(location.protocol.indexOf("https")==0?"https":"http")+"://image.providesupport.com/js/1ejsthvyh0azeasdh/safe-textlink.js?ps_h=Ci9a&ps_t="+new Date().getTime()+"&online-link-html=Live%20Chat&offline-link-html=Contact%20Us";setTimeout("sjkdUia.src=sjkdUia;document.getElementById('sjkdUia').appendChild(sjkdUia)",1)</script><noscript><div style="display:inline"><a href="http://www.providesupport.com?messenger=1ejsthvyhdsafchzi63uh">Contact</a></div></noscript>
<!-- END ProvideSupport.com Text Chat Link Code --></a></li>

So that is the Javascript - can I make that text link change color by inserting something there? I tried a few things like adding color to the inline bit of the code but it didnt work.

Or must I edit this bit?

Code:

<nav>
        <ul class="list-site-nav clearfix">
       
        <li><a class="page-link" href="">Page</a></li>   
        <li><a class="page-link" href="">Page</a></li
        <li><a class="page-link" href="">Page</a></li
        <li><a class="page-link" href="">Page</a></li
        <li><a class="page-link" href="">Page</a></li
       
        </ul>
</nav>

Perhaps it is easiest to make a seperate <li> class right? Personally I just think trying to change the font color within the javascript would be easiest.

Thanks a lot.

listerdl 02-04-2013 02:12 PM

Hi - I am just updating my own thread here but I *think* I solved it by creating a new <li> class specifically for the javascript and that seems to work ok.

So, CSS came to my rescue. Would you have used CSS or is it possible to style Javascript?

(basic question I know but I just wanna hear from you guys thanks).

Philip M 02-04-2013 03:54 PM

Quote:

Originally Posted by listerdl (Post 1310823)
Hi - I am just updating my own thread here but I *think* I solved it by creating a new <li> class specifically for the javascript and that seems to work ok.

So, CSS came to my rescue. Would you have used CSS or is it possible to style Javascript?

(basic question I know but I just wanna hear from you guys thanks).

As you say, use CSS.


All times are GMT +1. The time now is 02:57 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.