Created
September 16, 2014 19:53
-
-
Save xymor/eba54cb2b5234fb03022 to your computer and use it in GitHub Desktop.
when you ask a psd slicer to hack some js
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
if ($('#singleProdInfoBox #parcels-desc').html()){ | |
$('#singleProdInfoBox #parcels-desc').html($('#singleProdInfoBox #parcels-desc').html().replace('até', '')); | |
} | |
if ($('#singleProdInfoBox #parcels-desc').html()){ | |
$('#singleProdInfoBox #parcels-desc').html($('#singleProdInfoBox #parcels-desc').html().replace(' x sem', 'x sem')); | |
} | |
var x = $('#prc1').html(); | |
x = parseFloat(x); | |
x = x.toFixed(2); | |
x = x.replace('.', ','); | |
$('#prc1').html(x); | |
x = $('#prc2').html(); | |
x = parseFloat(x); | |
x = x.toFixed(2); | |
x = x.replace('.', ','); | |
$('#prc2').html(x); | |
$('#mainPhotoCont').attr('href', $('.thumb-img-single').attr('src')); | |
$('.thumb-img-single').on('click', function() { | |
var newsrc = $(this).attr('src'); | |
$('.k-prd-mainPhoto img').attr('src', newsrc); | |
$('#mainPhotoCont').attr('href', newsrc); | |
}); | |
$(window).load(function() { | |
<g:if test = "${imageLength}" > | |
$(".carousel").jCarouselLite({ | |
btnNext: ".next", | |
btnPrev: ".prev", | |
// auto: 4000, | |
// speed: 1000, | |
visible: 4, | |
scroll: 1, | |
vertical: true, | |
circular: false | |
}); | |
</g:if> | |
jQuery(".fancybox").fancybox(); | |
$('#avgStarSpan').on('click', function() { | |
$('.active').removeClass('active'); | |
$('#menu :nth-child(2)').addClass('active'); | |
$('.content').css('display', 'none'); | |
$('#contentGuestbook').css('display', 'block'); | |
$(window).scrollTo($('#menu'), 500); | |
}); | |
$('.skuUnavailable .btn').html('<span>Avise-me</span><span>quando chegar</span>'); | |
$('.k-sku-alert').html('Selecione uma variação de produto!'); | |
}); | |
$(function(){ | |
$("#skuId option").removeAttr('selected'); | |
$("#skuId option:nth-child(2)").attr('selected','selected'); | |
skuOnChange( $("form[name=buyForm]") ); | |
if ($('.skuList').children().length < 3){ | |
$("#skuId").hide(); | |
} | |
$(".k-thumbs > a").hide(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment