this.randomtip = function(){
var length = $("#showcase ul li").length;
var ran = Math.floor(Math.random()*length) + 1;
$("#showcase ul li:nth-child(" + ran + ")").show();
};
randomtip();
..the code above works well with .show() in the end, but if I change it to .addClass('show') it won't work.
I'd like to give it a class instead to apply float:left property to all li items instead of the default display:list-item. How do I fix this?
Thanks!