Tips and Tricks HQ Support Portal › Forums › General Stuff › Question about JavaScript – Load JavaScript in Footer
Tagged: move java script code
- This topic has 19 replies, 3 voices, and was last updated 13 years, 1 month ago by
admin.
-
AuthorPosts
-
January 2, 2012 at 7:29 am #39844
chrishudson
SpectatorI think that did it. Thanks you so much. I have tested it and I can login using the emember plugin and access all of the video content so I think my members should be able to do the same.
Thanks again!!!
January 2, 2012 at 7:34 am #39845chrishudson
SpectatorWait a sec. These two are still showing up at the top but the others have been moved to the bottom. Did I not include something here? Again thank you so much for your help!!!
<script type=’text/javascript’ src=’http://golflessonacademy.com/wp-content/plugins/wp-cart-for-digital-products/lib/jquery.lightbox-0.5.pack.js?ver=3.2.1′</scr>
January 3, 2012 at 5:12 am #39846admin
KeymasterThose are coming from eStore which we haven’t done anything with so far.
1. Open the “wp_eStore1.php” file and find the following two lines of code:
wp_enqueue_script('jquery.external.lib.js',WP_ESTORE_LIB_URL.'/jquery.external.lib.js');
wp_enqueue_script('jquery.lightbox',WP_ESTORE_LIB_URL.'/jquery.lightbox-0.5.pack.js');Once you find it remove these two lines of code.
2. Now add the following two lines of code inside the “wp_eStore_add_footer_code” function:
echo '<script type="text/javascript" src="'.WP_ESTORE_URL.'/lib/jquery.external.lib.js"></script>';
echo '<script type="text/javascript" src="'.WP_ESTORE_URL.'/lib/jquery.lightbox-0.5.pack.js"></script>';January 3, 2012 at 6:00 am #39847chrishudson
SpectatorComplete and working. Thank you!!! Does the following need to stay where it is in the header or could it be moved as well? Currently it is located in the header. All the other changes have been made and accomplished. Again, thank you for all your help!!!
<script type=”text/javascript”>
JS_WP_ESTORE_CURRENCY_SYMBOL = “$”;
JS_WP_ESTORE_VARIATION_ADD_STRING = “+”;
JS_WP_ESTORE_VARIATION_THOUSAND_SEPERATOR = “,”;
</script><script type=”text/javascript” src=”http://golflessonacademy.com/wp-content/plugins/wp-cart-for-digital-products/lib/eStore_read_form.js”></script><script type=”text/javascript”>
jQuery(document).ready(function($){
emember_forget_pass_trigger = ”;
$forgot_pass_overlay = $(“.forgot_pass_link”).click(function(e){
$(“#wp_emember_email_mailMsg”).html(“”).hide();
$(“#wp_emember_email_mailForm”).show();
$(‘.eMember_text_input’).val(“”);
}).overlay({
mask: {
color: ‘#ebecff’/*’darkred’*//*’#E7E7E7’*/,
loadSpeed: 200,
top: ‘30%’,
opacity: 0.9
},
api:true,
onBeforeLoad:function(){
emember_forget_pass_trigger = this.getTrigger();
},
closeOnClick: false
});
$(“#wp_emember_mailSendForm”).live(‘submit’,function(e){
var $this = this;
var divs = jQuery($this).parent().parent().find(“div”);
var emailId = jQuery($this).find(“input”).eq(0).val();
if(emailId==””)
return;
divs.eq(1).hide();
divs.eq(0).html(“”).append(jQuery(‘
Please Wait…
‘)).show();
jQuery.get( ‘http://golflessonacademy.com/wp-admin/admin-ajax.php’,{“event”:”send_mail”,”action”:”send_mail”,”email”:emailId},
function(data){
divs.eq(0).html(“”).append(jQuery(‘
‘+data.msg+’
‘));
setTimeout(“emember_forget_pass_trigger.overlay().close()”, 1000);
},
“json”);
e.preventDefault();
});
});
</script>
January 4, 2012 at 4:50 am #39848admin
KeymasterSome of the JavaScript needs to stay there.
The forgot password related stuff can be changed by doing the following:
1) Go to the Pages/forms settings menu of eMember
2) Enter a value in the “Password Reset Page” field (the help text of this field will guide you)
3) Now refresh the page and check it out. (if you have caching plugin then empty the cache first)
-
AuthorPosts
- You must be logged in to reply to this topic.