CSS not applying to jquery ajax content

I have a page that has a 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”…

via Css Website development » Search Results » ajax:

CSS not applying to jquery ajax content

I have a page that has a 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);

I was having trouble rebinding the click handlers to the #next, #lookup and #previous as well as the class SSOdd to the table #SymbolSearchResults tr:even. I fixed it by adding it into the complete function. However I cannot apply any styles to the target div #return. I can style elements in the #return by ID, but again, nothing to the #return div itself. Is there a solution to this? I can only style the div by using inline CSS in the html page, not desired. I also think maybe I should use the .live function for the click functions inside the complete function? can you add a class with .live?
Please help unf**ck my code!
thx
……………………………………..

It doesn’t appear to be linking via the ID identifier as you said, but I can change the class of that div to .purchase, and it takes on those class attributes. Possibly change the declaration to div.return and the id=’return’ to class=’return’.
Edit
Going to update this until I find the answer on why it’s not working, or someone else posts. So far, I’m able to reference the div via document.getElementById(‘return’).style.color = ‘#FFFFFF’;

For more info: CSS not applying to jquery ajax content

Css Website development » Search Results » ajax

CSS not applying to jquery ajax content

Share this post:

Related Posts

Leave a Comment