i'm getting some problem using jquery. I hav a series of cards with an href attribute that call a php page and sends the attribute with the get method. Here's an example
<div class="pers_genres_card">
<div class="card-panel teal_green">
<span class="white-text"><a class="pers_href_white" target="_self" href="generatorgen.php?genre=Blues">Classica</a></span>
</div>
<div class="card-panel teal_orange">
<span class="white-text"><a class="pers_href_white" href="generatorgen.php?genre=Blues">Blues</a></span>
</div>
Now I have a central div where i want to load the result of my php script without page refreshing. This is my jquery code:
$(document).ready(function(){
$('a.pers_href_white').click(function(){
var page = $(this).attr('href');
$('#central').load(page);
return false;
}
});
});
But when I try to click on the href, the results are shown in another page. In few words the jquery script doesn't start, so the classical href attribute load. I have already written another jquery script that works perfectly, also more complex than this script, i can't understand why it doesn't work.