This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Housekeeping */ | |
*{ margin:0; padding:0; } | |
/* Define your base font-size here; most elements will inherit this. */ | |
html{ | |
font-size:1em; /* Assuming 16px... */ | |
line-height:1.5; /* 24px (This is now our magic number; all subsequent margin-bottoms and line-heights want to be a multiple of this number in order to maintain vertical rhythm.) */ | |
} | |
/* Common margin-bottom for vertical rhythm. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.inline-block { | |
display: inline-block; | |
/* IE7 hack to mimic inline-block on block elements */ | |
*display: inline; | |
*zoom: 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.clearfix:before, .clearfix:after { content: ""; display: table; } | |
.clearfix:after { clear: both; } | |
.clearfix { *zoom: 1; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Varien.Tabs = Class.create(); | |
Varien.Tabs.prototype = { | |
initialize: function(selector) { | |
var self=this; | |
$$(selector+' a').each(this.initTab.bind(this)); | |
}, | |
initTab: function(el) { | |
el.href = 'javascript:void(0)'; | |
if ($(el.parentNode).hasClassName('active')) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- replace <?php echo $_product->getId() ?> with your product id if you know it, if not then this snippet is to be used in a loop of products where $_product is a reference to the catalog/product model --> | |
<button onclick="location.href ='<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>checkout/cart/add?product=<?php echo $_product->getId() ?>&qty=1'">Add To Cart</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('block-id')->toHtml(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('ul > li').click(function() { | |
var index = $(this).prevAll().length; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var e = $("", { href: "#", class: "a-class another-class", title: "..." }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("p.value:contains('thetextvalue')").hide(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.fn.autoscroll = function(selector) { | |
$('html, body').animate( | |
{ scrollTop: $(selector).offset().top }, | |
500 | |
); | |
} | |
//Then to scroll to the class/area you wish to get to like this: | |
$('.area_name').autoscroll(); |
OlderNewer