Jump to content

changing css styles with ajax?


shadiadiph

Recommended Posts

If you eval() your AJAX response, your AJAX could print out JavaScript code that would change either the CSS class or specific CSS attributes. A couple examples:

 

document.getElementById('elementId').className = 'newClassName';
document.getElementById('elementId').style.color = '#FF0000';

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.