Implement Jquery Into Prototypejs
I've got this issue with my magento onepage checkout. I want to implement that when you press complete order it disables the button only when everything is filled in and the ToS ar
Solution 1:
Heres your code snippet in PrototypeJS
document.observe('dom:loaded',function(){
var fewSeconds = 10;
$('onestepcheckout-button-place-order').observe('click',function(){
var textelement = this.down('span span span');
this.writeAttribute('disabled','disabled');
textelement.update('Even geduld A.U.B.')
this.addClassName('disabled');
setTimeout(function(){
this.writeAttribute('disabled',false);
textelement.update('Bestelling plaatsen');
this.removeClassName('disabled');
}.bind(this),fewSeconds*1000)
});
});
I made some improvements to make the code more concise
Solution 2:
I managed to get it working using the following:
jQuery( document ).ready(function( $ ) {
// You can use the locally-scoped $ in here as an alias to jQuery.// or change $ above to $j
$( "#how-it-works .step" ).hide();
$('.step').each(function( index ) {
$(this).delay( index * 700 ).fadeIn();
});
});
A combination of several posts on here. Seems to be really simple and lightweight. Thanks for everyone's help!
Post a Comment for "Implement Jquery Into Prototypejs"