I'm using a twitter feed control and I'm trying to adjust the font size of one of the elements using javascript.
Here's the html snippet in question:
<div class="twtr-hd">
<a class="twtr-profile-img-anchor" href="http://twitter.com/pikefindotcom" target="_blank"><img src="http://a0.twimg.com/profile_images/1266884773/stock-market-chart_normal.jpg" class="twtr-profile-img" alt="profile"></a>
<h3>Pikefin</h3>
<h4><a href="http://twitter.com/pikefindotcom" target="_blank">pikefindotcom</a></h4>
</div>
I'm trying to change the font size of this tag:
<h3>Pikefin</h3>
Here's the Firebug output that is showing the appropriate css:
#twtr-widget-1 .twtr-doc, #twtr-widget-1 .twtr-hd a, #twtr-widget-1 h3, #twtr-widget-1 h4, #twtr-widget-1 .twtr-popular {
background-color: #333333 !important;
color: #FFFFFF !important;
}
index.php #4 (line 1)
.twtr-widget h3 {
font-size: 11px !important;
font-weight: normal !important;
}
widget.css (line 12)
.twtr-widget-profile h3, .twtr-widget-profile h4 {
margin: 0 0 0 40px !important;
}
widget.css (line 12)
I'm using jquery to retrieve the element (disclaimer: jquery noob) which seems to work fine but then I can't figure out the syntax to set the font size. Here's what I thought the code should be:
var element = $('.twtr-hdr h3');
element.style.fontSize="17px";
But that gives me this error message: "element.style is undefined"
So I'm unsure as to exactly what object type jquery is returning. Any assistance would be much appreciated.