How to send a php var to jQuery Ajax call with two different file

I use the data attribute to pass variables from PHP to JS.

<div data-your-php-variable="<?php echo $yourCoolVar; ?>"></div>