I am trying to use jquery to hide my name value on my site using:
jQuery(document).ready(function() {
jQuery("iframe#kloutframe").contents().find(".user").hide();
});
the klout widget:
<div align="center"><iframe name="kloutframe" src="http://widgets.klout.com/badge/chrishough?size=s&text_color=ffffff" style="border:0" scrolling="no" allowTransparency="true" frameBorder="0" width="120px" height="59px"></iframe></div>
the frame html outout copied from firebug:
<div align="center">
<iframe width="200px" scrolling="no" height="98px" frameborder="0" allowtransparency="true" style="border:0" src="http://widgets.klout.com/badge/chrishough?text_color=ffffff" name="kloutframe">
<html>
<head>
<body>
<div class="badge_cont">
<a target="_blank" onclick="mpmetrics.track('widgets-badget-click', {'referer':'http://noconformity.co/chrishough/'});" href="http://klout.com/chrishough">
<div class="tile">
<div class="content">
<div class="user">
<div id="klout_name">chrishough</div>
</div>
</div>
</a>
</div>
<script language="javascript" type="text/javascript" src="http://static.chartbeat.com/js/chartbeat.js">
</body>
</html>
</iframe>
</div>
yes, that’s a little inline css for centering, but I will be making modifications to that.
for some reason jquery can not find the element to hide it. thoughts?
I had similar issues so I ended up creating my own badge based on their API.
http://www.kloutwidget.com/