Solved

How can I insert a variable in this code?

Posted on 2013-01-11
2
209 Views
Last Modified: 2013-01-11
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
Comment
Question by:hidrau
2 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 38766677
your quotes are unbalanced ' <--- simple double ---> "

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

Open in new window

0
 
LVL 1

Author Closing Comment

by:hidrau
ID: 38766853
thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question