Create a JavaScript file to hold your script.
Add setup code in the functions.php.
Access Ajax data to manipulate DOM.