Solved

Jquery Label In-line Style Not Working?

Posted on 2014-07-30
6
164 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

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

This article discusses four methods for overlaying images in a container on a web page
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

828 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