Solved

Jquery Label In-line Style Not Working?

Posted on 2014-07-30
6
165 Views
Last Modified: 2014-07-30
I'm trying to change part of the Label html like so. Problem: font is still bold

<label id="caption">New image name: (optional)</label>
$("#caption").html("Image saved as: " + "<br/> <style=\"font-weight: normal\">" + data + "</style>");
0
Comment
Question by:WorknHardr
6 Comments
 
LVL 13

Expert Comment

by:duncanb7
ID: 40229181
Is it what your want, pls try this
Duncan
<label id="caption">New image name: (optional)</label>
$("#caption").css("font-weight","normal");

Open in new window

0
 
LVL 58

Expert Comment

by:Gary
ID: 40229184
What is the point of the style tag? That won't do anything

$("#caption").html("Image saved as:<br/>" + data);
0
 
LVL 21

Accepted Solution

by:
Randy Poole earned 300 total points
ID: 40229187
$("#caption").html("Image saved as:" + "<br/> <span style='font-weight: normal'>" + data + "</span>");

Open in new window

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Closing Comment

by:WorknHardr
ID: 40229536
duncanb7: Thanks, I need only certain text changed, not the entire text

Gary: You shouldn't post a criticism without a solution!

Randy Poole: Excellent! Just what I needed, thx
0
 
LVL 58

Expert Comment

by:Gary
ID: 40229558
Do you understand what a question is?
0
 

Author Comment

by:WorknHardr
ID: 40229798
Drop it!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert Silverlight ERP To Angularjs,HTML5 3 55
ASP.net Markup for Sub Menu 2 39
links not working 2 25
Calculating percentage 2 25
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

679 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