Magento is the eCommerce software platform for growth that promises to revolutionize the industry. Its modular architecture and unprecedented flexibility means your business is no longer constrained by your eCommerce platform.
Tuesday, November 27, 2012
Add Want Button to your site
Use script
<script> (function() { var _w = document.createElement("script"); _w.type = "text/javascript"; _w.async = true; _w.src = "http://button.wanttt.com/button/script/"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(_w, s); })(); </script> <a href="http://wanttt.com/want/initial_popup/" data-merchant_name="ESCAPED_MERCHANT_NAME" data-title="ESCAPED_PRODUCT_NAME" data-price="PRODUCT_PRICE" data-image_url="HIGH_RESOLUTION_PRODUCT_IMAGE_URL" data-count="true" data-style="wb1" data-page_source="PRODUCT" class="wantButton"></a>
or go to http://wantbutton.com/code.html
Tuesday, November 6, 2012
show plain text in a password field and then make it a regular password field on focus
Use html as
<input type="text" value="password" id="password">
And use script
jQuery( document ).ready( function(){
jQuery( document ).delegate( "#password", "focusin focusout",
function(e){
var elm = jQuery( "#password" )[0];
if( e.type == "focusin" && elm.type == "text" ) {
jQuery( elm ).replaceWith( jQuery( "<input>", {id: "password", type:"password", value:"" } ) );
jQuery( "#password")[0].focus();
}
else if( e.type =="focusout" && elm.type == "password" && !elm.value ) {
jQuery( elm ).replaceWith( jQuery( "<input>", {id: "password", type:"text", value:"password" } ) );
}
}
);
});
<input type="text" value="password" id="password">
And use script
jQuery( document ).ready( function(){
jQuery( document ).delegate( "#password", "focusin focusout",
function(e){
var elm = jQuery( "#password" )[0];
if( e.type == "focusin" && elm.type == "text" ) {
jQuery( elm ).replaceWith( jQuery( "<input>", {id: "password", type:"password", value:"" } ) );
jQuery( "#password")[0].focus();
}
else if( e.type =="focusout" && elm.type == "password" && !elm.value ) {
jQuery( elm ).replaceWith( jQuery( "<input>", {id: "password", type:"text", value:"password" } ) );
}
}
);
});
Subscribe to:
Posts (Atom)