im using jquery get() method to get my PHP page into a "div".
heres the code i've tried so far -
$(function(){
$('#rssRedirect').click( function(){
var jqxhr = $.get( "event.php?within=100", function(response) {
$('#page-right-event-result-wrapper').html(response);
})
})
})
what am i doing wrong with the button click event ?
Your Syntax is off. Try:
$(document).ready(function(){
$('#rssRedirect').click( function(){
var jqxhr = $.get( "event.php?within=100", function(response) {
$('#page-right-event-result-wrapper').html(response);
});
});
});
heres the solution:
$(function(){
$('#rssRedirect').click( function(event){
event.preventDefault();
var jqxhr = $.get( "event.php?within=100", function(response) {
$('#page-right-event-result-wrapper').html(response);
})
})
})