My SellerDeck Account | Newsletter | Free Trial

Community and Knowledge Base

  #1  
Old 04-Jan-2018, 11:10 AM
MattSMR MattSMR is offline
Registered User
Join Date: Dec 2016
Full Name: Matt McCullough
Posts: 51
Thanks: 7
Thanked 11 Times in 7 Posts
Jquery update style of span

We have an external javascript file (actinicsearch.js) that gets called as part of a catalog results page, AJAX is involved on this document - https://www.columnradiators4u.co.uk/...radiators.html

I have a jquery function for altering colour of a span when it detects certain text - please see my code below.

Code:
function ReInitStockColor(){
 $(function() {
  $("span:contains(In Stock)").css("font-weight", "bold").css("color", "#00BF00");
  $("span:contains(Due)").css("color", "#FF0000");
  $("span:contains(Made)").css("font-weight", "bold").css("color", "#00BF00");
 });
}
This code is being called earlier on in our file, however it is not executing. If I take my code in to chrome/Firefox console and run it, it executes successfully.

Is anybody able to assist in this matter?

Many thanks in advance,

Matt - SMR.

EDIT: Should probably add, see my last post of this thread - reason behind this method. http://community.sellerdeck.com/showthread.php?t=57439
__________________
Matt. M - SMR Enterprises Ltd.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes 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



All times are GMT. The time now is 10:19 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.