Get The Latest From NVIDIA On Shield
"); }, //Default http error handling, note this function only applies to http errors not form processor errors, for that please override "handleErrors" handleHttpErrors: function(jqXHR, textStatus, errorThrown) { if(this.settings.region in submissionFailedErrors) { this.$formErrorMessages.show().text(submissionFailedErrors[this.settings.region]); } else { this.$formErrorMessages.show().text(submissionFailedErrors['en_us']); } }, //Default error handling, note this function only applies to form processor errors, NOT http errors, for that please override "handleHttpErrors" handleErrors: function(response) { var formID = response.formID var fields = response.data; var errors = []; for(var field in fields) { if(fields.hasOwnProperty(field)) { var datum = fields[field]; if(datum.status != 'SUCCESS') { errors.push({ name: datum.name, value: datum.value, errors: datum.messages }); } } } //Find and show outstanding errors $.each(errors, function(index, error) { if(error.errors.join) { $('#'+formID+' .fp-field-error-' + error.name).show().html(error.errors.join('
')); //$('.fp-field-error-' + error.name).show().html(error.errors.join('
')); } $('#'+formID+' .fp-field-error-' + error.name).closest('.fp-container').addClass('fp-container--error'); //$('.fp-field-error-' + error.name).closest('.fp-container').addClass('fp-container--error'); }); //Show any form level errors that we might have if(response.messages.length > 0) { this.$formErrorMessages.show().html(response.messages.join('
')); } }}); //Wire up the jquery plugin$.fn[pluginName] = function(options) { return this.each(function() { if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, options)); } });};})( jQuery, window, document );;(function ( $, window, document, undefined ) { "use strict"; var pluginName = "addFormProcessorErrorElements", defaults = { }; function Plugin(element, options) { this.element = element; this.$formElement = $(element); this.settings = $.extend({}, defaults, options); this._defaults = defaults; this._name = pluginName; this.init(); } $.extend(Plugin.prototype, { init: function () { var that = this; that.addMainFormError(); that.addFieldErrors(); }, addMainFormError: function() { this.$formElement.find('#fieldList').before('
'); }, addFieldErrors: function() { var that = this; this.$formElement.find('input[type=text], select').each(function() { var $this= $(this); var name = $(this).attr('name'); $this.after('
'); }); this.$formElement.find('input[type=checkbox]').each(function() { var $this= $(this); var name = $(this).attr('name'); var id = $(this).attr('id'); $this.next('label').after('
'); }); } }); //Wire up the jquery plugin $.fn[pluginName] = function(options) { return this.each(function() { if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, options)); } }); };})( jQuery, window, document );jQuery(document).ready(function($) {var $form = $('.fp').addFormProcessorErrorElements().formProcessor({ handleSuccess: function (data) { if (data.formID == "FP_20161019_Shield_News_and_Updates") { $('.fp').replaceWith("
" + data.messages.join(". ") + "
") $('.shield-sub-header').remove(); $('#shield-subscription .shield-sub-body').addClass("shieldsub-thankyou"); try { /* nvEventTracker('Forms|Submission', 'FP_20161019_Shield_News_and_Updates', '', '0', 'TRUE'); */ dtm_track('formSubmit',{formID:'FP_20161019_Shield_News_and_Updates'}); } catch (e) { } } }, handleHttpErrors: function (jqXHR, textStatus, errorThrown) { this.$formErrorMessages.show().text(textStatus); } });}); window.nv = window.nv || {};$(document).ready(function() {//$('.fp').formProcessor();//$('.fp').addFormProcessorErrorElements().formProcessor(); $('.open-rate-this-page').click(function () { // body... //e.preventDefault(); nv.nav.showRatethispage(); }) $('.show-header-nav').click(function () { nv.nav.hideBackdrop(); }) nv.nav.init();});var $BACKDROP = $('.page-backdrop, .show-header-nav');var $RATE_THIS_PAGE = $('.rate-this-page'); var $HEADER_NEST = $('.header-nest'); var $MENUS = $('.header-overlay-module'); nv.nav = { init: function() { //this.bind(); this.ratethispage(); }, showBackdrop: function() { $HEADER_NEST.addClass('active'); $('.header-icon-overlay').addClass('active'); $BACKDROP.addClass('active') .stop(false, true) .animate({ opacity: 1 }); $MENUS.stop(false, true) .animate({ right: 0, padding: '20px' }); }, hideBackdrop: function() { $BACKDROP.stop(false, true) .animate({ opacity: 0 }, function() { $(this).removeClass('active'); $HEADER_NEST.removeClass('active'); $('.header-icon-overlay').removeClass('active'); nv.nav.removeAll(); }); $MENUS.stop(false, true) .animate({ right: '-320px' }); }, hide: function() { this.hideBackdrop(); }, showRatethispage: function() { // window.scrollTo(0, 0); $RATE_THIS_PAGE.addClass('active'); this.showBackdrop(); $('.header-icon-overlay').hide(); }, ratethispage: function() { return $(function() { $('.rate-this-page-button').on('click', function() { $(this).slideUp('fast'); return $('.rate-this-page-form').slideDown('slow'); }); $('.rate-this-page-form').on('click', '.more-info.close', function() { $('.rate-this-page-form').slideUp('fast'); return $('.rate-this-page-button').slideDown('slow'); }); return $('.rating-select').each(function() { return $(this).children('div').bind({ mouseenter: function() { var currentItems; currentItems = $(this).index() + 1; return $(this).parent().children('div:lt(' + currentItems + ')').addClass('hover'); }, mouseleave: function() { return $(this).parent().children('div').removeClass('hover'); }, click: function() { var currentItems, thisRaterID; currentItems = $(this).index() + 1; thisRaterID = $(this).parent().attr('id'); $('input[name="' + thisRaterID + '"]').val(currentItems); $(this).parent().children('div').removeClass('hover'); $(this).parent().children('div:lt(' + currentItems + ')').addClass('on'); return $(this).parent().children('div:gt(' + $(this).index() + ')').removeClass('on'); } }); }); }); } };