Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

How can I insert a variable in this code?

Hello guys

I have this line

$('tr[corPadrao*="trc"]').removeAttr('class');  

I want to insert a variable that is a prefix, this way:

var pfx = "MC_"

$('tr[corPadrao*=" + pfx + "trc"]').removeAttr('class');  

But that doesn't work :((

Thanks
0
hidrau
Asked:
hidrau
1 Solution
 
leakim971PluritechnicianCommented:
your quotes are unbalanced ' <--- simple double ---> "

$("tr[corPadrao*='" + pfx + "trc']").removeAttr('class');  

Open in new window

0
 
hidrauAuthor Commented:
thanks
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now