Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- jQuery(document).ready(function($) {
- if (window.location.href.indexOf(/san-diego-property-management/) > -1) {
- document.cookie = "dynamicnumber=true; path=/";
- }
- function getCookie(name) {
- var nameEQ = name + '=';
- var ca = document.cookie.split(';');
- for (var i = 0; i < ca.length; i++) {
- var c = ca[i];
- while (c.charAt(0) == ' ') {
- c = c.substring(1, c.length);
- }
- if (c.indexOf(nameEQ) == 0) {
- return unescape(c.substring(nameEQ.length, c.length));
- }
- }
- return "";
- }
- var value = getCookie('dynamicnumber');
- if (value != '') {
- alert('dynamic phone number cookie set - displaying phone number 858-876-0557');
- $('body :not(script)').contents().filter(function() {
- return this.nodeType === 3;
- }).replaceWith(function() {
- //return this.nodeValue.replace('858-876-9455','858-876-0557');
- });
- } else {
- alert('no dynamic phone cookie set - displaying original phone number 858-876-9455');
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement