?
Solved

Jquery Label In-line Style Not Working?

Posted on 2014-07-30
6
Medium Priority
?
169 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 1200 total points
ID: 40229187
$("#caption").html("Image saved as:" + "<br/> <span style='font-weight: normal'>" + data + "</span>");

Open in new window

0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

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

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Find out what you should include to make the best professional email signature for your organization.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
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…
Suggested Courses

771 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