I need jQuery to be implemented when I visit http://www.mysite.com/local/examplepage/example.php. I also need jQuery to be implemented when the URL is equal to http://www.mysite.com/local/, or http://www.mysite.com/local/anything**.
How would I do this?
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>
Use this code:
<?php if (stripos($_SERVER['REQUEST_URI'],'/local/') !== false) {echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>';} ?>
Where /local/ is the url location that jquery will be implemented on. And https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js is the location of your jquery file.