I have a page with jquery AJAX function
$(document).ready(function() {
var options = {
target: '#return',
beforeSend: function() {
$('#processing').show();
},
complete: function() {
$('#processing').hide();
$("#SymbolSearchResults tr:even").addClass("SSOdd");
$("#previous").click(function(){ changestart('back'); });
$("#next").click(function(){ changestart("forward"); });
$("#lookup").click(changestart);
}
};
$('#SymbolSearchForm').ajaxForm(options);
});
function changestart(direction)
{
var rowsElement = $("#maxrows");
var rowsValue = parseInt(rowsElement.val());
var startElement = $("#startID");
var value = parseInt(startElement.val());
startElement.val(direction == "forward" ? value + rowsValue : direction == "back" ?
value - rowsValue : 1);
}
</script>
I'm having trouble linking click handlers to #next, #lookup and #previous, as well as to the SSOdd class in the #SymbolSearchResults tr: even table. I fixed it by adding it to the full function. However, I cannot apply any styles to the target div #return. I can style elements in # return by identifier, but again, nothing is needed for the #return div. Is there a solution to this? I can only style the div using inline CSS on the html page, not wanting to. I also think maybe I should use the .live function for the click functions inside the full function? can you add class with .live?
Please help with the error ** ck my code!
THX