Created
May 19, 2014 16:54
-
-
Save yuchant/a1096861fab1c07579f5 to your computer and use it in GitHub Desktop.
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 fitPhotoTargetSelector = name + " .fittingbox-fitphoto-target"; | |
window.fitPhoto = FitPhoto.create(fitPhotoTargetSelector, { | |
width: 327, | |
glassID: glassID, | |
localeChain: 'en_US' | |
}); | |
// handle change sku | |
$actionContainer.find('.fittingbox-sku').unbind('click').click(function() { | |
var sku = $(this).data('sku'); | |
window.fitPhoto.tryOn(sku); | |
}) | |
// upon closing the window, call removal function and remove the element. | |
destructFunc = function() { | |
console.log('removing fitphoto'); | |
$template.remove(); | |
window.fitPhoto.remove(); | |
window.fitPhoto = null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment