• I am converting an old website over to wordpress. It was developed by another person and they had custom jQuery script in the header.

    When I copy it over as is, into the wordpress header, it doesn’t work. I”m wondering if someone is able to assist.

    This was the script in the old website, if you are able to advise where I put this and do i need to change it to suit WP format?

    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script type="text/javascript" src="/scripts/main.js"></script>
    <link href="/styles/subpage.css" rel="stylesheet" type="text/css"/>
    <script language="javascript" src="../scripts/jquery.js"></script>
    <script language="javascript" src="../scripts/jquery.url.js"></script>
    <script language="javascript" src="../scripts/pngfix.js"></script>
    <script>
    jQuery(document).ready(function(){
    	//setTimeout(function(){jQuery("#bluey").fadeIn(); },2500);
    	jQuery(".box").each(function(){
    		jQuery(this).focus(function(){
    			if(jQuery(this).attr('value') == "Username" || jQuery(this).attr('value') == "ID"){
    				jQuery(this).attr('value','');
    			}
    		});
    	});
    	jQuery("#access").submit(function(){
    		jQuery("#hole").html('').load("login.php",{ 'accesskey':jQuery("#accesskey").val() });
    		jQuery("#accesskey").attr('value','');
    		return false;
    	});
    	jQuery("#update_overlay").click(function(){
    		jQuery("#update_overlay").fadeOut();
    		jQuery("#update_load").fadeOut().html('');
    		jQuery("#update_img").fadeOut().html('')
    	});
    	jQuery("#update_overlay").height($("body").height());
    	jQuery("#update_overlay").width($("body").width());
    });
    function hide_update(){
    	jQuery("#update_img").fadeOut().html('');
    }
    </script>
    <!--[if IE 6]>
    <script language="javascript" src="/scripts/pngfix2.js"></script>
    <script>
     DD_belatedPNG.fix('*');
    </script>
    <![endif]-->
    </head>


    please use code buttons

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Mousie

    (@melinayung)

    And this was in the FOOTER for where you activate the script action…

    <div id="cu_login">
            	CLIENT UPDATE
                <form action="" style="margin:0; padding:0;" id="access">
            	<input type="text" class="box" name="accesskey" id="accesskey" onfocus="if(this.value == 'Access Key'){ this.value = ''; }" value="Access Key" /> <input type="submit" class="go" value="GO" />
               	</form>
                <span id="hole"></span>
            </div>
        </div>
    </div>
    <div style="position:absolute; margin-left:-300px; width:600px; height:660px; background:#ffffff; left:50%; top:20%; z-index:40; display:none; overflow:hidden;" id="update_load"></div>
    <div style="position:absolute; width:1000px; height:1000px; background:url(/images/overlay_blue.png) repeat; left:0px; right:0px; top:0px; bottom:0px; z-index:30; display:none;" id="update_overlay"></div>
    <div id="update_img" style="width:500px; background-color:#ffffff; position:absolute; left:50%; top:10%; margin-left:-250px; z-index:60; border:2px solid #000000; display:none;"></div>


    please use the code buttons

    Thread Starter Mousie

    (@melinayung)

    This is the link to the old website which is currently working https://premiumfinance.com.au – see CLIENT UPDATE section in the footer. Access key is typed in and a pop up window appears showing clients data.

    As I can’t give access codes out, if you just press go and an error message appears which is the way it should function.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add jQuery to wordpress header’ is closed to new replies.