My Sellerdeck Account | Free Trial

Sellerdeck Community and Knowledge Base

Old 04-Jan-2018, 11:10 AM
MattSMR MattSMR is offline
Registered User
Join Date: Dec 2016
Full Name: Matt McCullough
Posts: 69
Thanks: 11
Thanked 15 Times in 11 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 -

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

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.
Matt. M - SMR Enterprises Ltd.
Reply With Quote

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 06:18 PM.

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