Solved

Jquery Label In-line Style Not Working?

Posted on 2014-07-30
6
167 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

737 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