Skip to content

Instantly share code, notes, and snippets.

@charleshimmer
charleshimmer / gist:1514696
Created December 23, 2011 16:40
Testing autofocus
function featureTest(element, attribute);
var el = document.createElement('input');
if(attribute in el){
return true;
else{
return false;
}
}
@charleshimmer
charleshimmer / gist:1285195
Created October 13, 2011 19:10
Update Bengay Integration Code
$BV.configure('global', {
allowSamePageSubmission: true,
doShowSubmission: function() {
tb_show('', '#TB_inline?height=auto&width=730&modal=true&inlineId=submissioncon','');
},
onSubmissionReturn: function() {
tb_remove();
},
doScrollSubmission: function() {
return false;
@charleshimmer
charleshimmer / gist:1217685
Created September 14, 2011 20:27
DoShowContent
$BV.ui('rr', 'show_reviews', {
productId: '67760',
submissionContainerDiv: 'BVRRContainer',
doShowContent: function(){
// place logic here to show the reviews tab
}
});
// When doing smart SEO advanced you will check for the existence of a URL parameter named bvrrp.
// If that parameter exists, you will check to make sure that file exists on disk, and then include it.
// For example, if the product id was 6789 and page 2 was being requested, the parameter bvrrp would be 1230-en_us/reviews/product/2/6789.htm.
// If that parameter doesn't exist, you will default to including page 1.
// Here is an example function you might write to handle this logic.
function getRRSmartSEOFile() {
$SEOParam = getURLParameter('bvrrp');
$SEOFile = '/path/to/smartseo/' + $SEOParam;