53 lines
881 B
JavaScript
53 lines
881 B
JavaScript
$(function() {
|
|
|
|
$('#show').hide();
|
|
$('#enquiryTable').hide();
|
|
|
|
$("#ajaxLoadEnquiry").hide();
|
|
|
|
|
|
|
|
|
|
var userID = $('#userID').text();
|
|
|
|
|
|
var enquiriesURL = '/enquiries/view_user_enquiries/'+userID;
|
|
|
|
getPage(enquiriesURL);
|
|
|
|
|
|
$("div.paging > a, div.paging > span > a").live('click',function() {
|
|
destination = $(this).attr('href');
|
|
getPage(destination);
|
|
return false;
|
|
|
|
});
|
|
|
|
$('#hide').click(function() {
|
|
$(this).hide();
|
|
$('#show').show();
|
|
$('#enquiryTable').slideUp('fast');
|
|
});
|
|
|
|
|
|
$('#show').click(function() {
|
|
$(this).hide();
|
|
$('#hide').show();
|
|
$("#ajaxLoadEnquiry").show();
|
|
$('#enquiryTable').slideDown('fast', function() {
|
|
$("#ajaxLoadEnquiry").hide();
|
|
});
|
|
|
|
});
|
|
|
|
|
|
function getPage(url) {
|
|
$.get(url, function(data) {
|
|
$('#enquiryTable').html(data);
|
|
$('#enquiryTable').slideDown('fast');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}); |