RSS feed
Change the heading colour on load
by humanzing
HTML
<script src="http://jquery-plugins.net/FeedEk/FeedEk.js"></script>
<div id="example">TEST COLOUR</div>
<div id="divRss"></div>
CSS
.feedEkList{width:450px; list-style:none outside none;background-color:#FFFFFF; border:1px solid #D3CAD7; padding:4px 6px; color:#3E3E3E;}
.feedEkList li{border-bottom:1px solid #D3CAD7; padding:5px;}
.feedEkList li:last-child{border-bottom:none;}
.itemTitle a{font-weight:bold; color:#4EBAFF; text-decoration:none }
.itemTitle a:hover{ text-decoration:underline }
.itemDate{font-size:11px;color:#AAAAAA;}
#example { font-weight: bold; cursor: pointer;}
JavaScript
$(document).ready(function(){
$('#divRss').FeedEk({
FeedUrl : 'https://www2.yggtorrent.si/rss?action=generate&type=subcat&id=2183&passkey=DRK9BeGWfnVoV0Eu1FNn0Hn9eipqb6Bq'
});
var r = Math.floor(Math.random()*256);
var g = Math.floor(Math.random()*256);
var b = Math.floor(Math.random()*256);
$('#example, .itemTitle a').css("color", getHex(r,g,b));
$('#example').click(function() {
$('.itemTitle a').css("color", getHex(r,g,b));
});
function intToHex(n){
n = n.toString(16);
if( n.length < 2)
n = "0"+n;
return n;
}
function getHex(r, g, b){
return '#'+intToHex(r)+intToHex(g)+intToHex(b);
}
});