Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-04-2013, 03:20 AM   PM User | #1
listerdl
Regular Coder

 
Join Date: Mar 2011
Posts: 157
Thanks: 7
Thanked 0 Times in 0 Posts
listerdl is an unknown quantity at this point
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 is offline   Reply With Quote
Old 02-04-2013, 02:12 PM   PM User | #2
listerdl
Regular Coder

 
Join Date: Mar 2011
Posts: 157
Thanks: 7
Thanked 0 Times in 0 Posts
listerdl is an unknown quantity at this point
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).
listerdl is offline   Reply With Quote
Old 02-04-2013, 03:54 PM   PM User | #3
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,033
Thanks: 197
Thanked 2,410 Times in 2,388 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Quote:
Originally Posted by listerdl View Post
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 the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:41 AM.


Advertisement
Log in to turn off these ads.