my links saved into a database do not work like the normal links
My problem is the following: I am programming a searcher and I am using php too and saving the key words and the links into a database, but the links gotten from my database don't work like normal links and don't replace the content on a <DIV> that I want but other page is opened.
What I mean is this code does not work when 'a' is from a database ->
$('a').each(function(){
var href = $(this).attr("href");
$(this).attr({ href: "#"});
$(this).click(function(){
$("#contenido").load(href);
});
});
Here I send the example....