Title: Ajaxify WordPress Site(AWS) Issue
Last modified: August 20, 2016

---

# Ajaxify WordPress Site(AWS) Issue

 *  [james godwin](https://wordpress.org/support/users/james-godwin/)
 * (@james-godwin)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/ajaxify-wordpress-siteaws-issue/)
 * I’m using Ajaxify WordPress plugin, which is working great, but if I include 
   any script tags within a page linking to a file <script src=””></script> its 
   is removing the tag and stopping other pluggins or theme javascript from working.
 * I can see you’re removing all scripts here
 *     ```
       // Fetch the scripts
       					$scripts = $dataBody.find('#document-script');
       					if ( $scripts.length ) $scripts.detach();
       ```
   
 * and adding again here
 *     ```
       // Add the scripts
       					$scripts.each(function(){
       						var $script = $(this),
       							scriptText = $script.html(),
       							scriptNode = document.createElement('script');
       							console.log(scriptText);
       						try {
       							// doesn't work on ie...
       							scriptNode.appendChild(document.createTextNode(scriptText));
       							contentNode.appendChild(scriptNode);
       						} catch(e) {
       							// IE has funky script nodes
       							scriptNode.text = scriptText;
       							contentNode.appendChild(scriptNode);
       						}
       						if($(this).attr('src') != null) {
       							scriptNode.setAttribute('src', ($(this).attr('src')));
       						}
       					});
       ```
   
 * Any ideas?

The topic ‘Ajaxify WordPress Site(AWS) Issue’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [james godwin](https://wordpress.org/support/users/james-godwin/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/ajaxify-wordpress-siteaws-issue/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
