Basically i'm trying to grap the text from the title attribute in a link and show it in a paragaph in another div when a user hovers of the item, and then hide it when the user moves away. so far what i've got is
(function($) {
$.fn.showText = function() {
$(this).hover(
function() {
$(this)
.data('title', $(this).attr('title'))
.removeAttr('title')
.appendTo(".itemDecription p");
},
function() {
$(this).attr('title', $("this").data('title'));
}
);
}
})(jQuery);
//call the plugin
$(function(){
$('.wrapper ul li a').showText();
});
I got the code from somewhere else on stackoverflow, but i just can't seem to get it to work, and help would be much appriciated.