Skip to content

Commit

Permalink
Add var declaration.
Browse files Browse the repository at this point in the history
  • Loading branch information
toolstack authored and ocean90 committed Oct 8, 2017
1 parent 73c7adc commit 9b1fbfc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assets/js/common.js
Expand Up @@ -19,10 +19,10 @@ var $gp = function($) { return {
$gp.notices.element.html('').hide();
},
generic_message: function(css_class, message, dismiss) {
if ( true == dismiss ) {
var dismiss_message = '';

if ( true === dismiss ) {
dismiss_message = '<div id="gp-js-message-dismiss" class="gp-js-message-dismiss">Discard</div>';
} else {
dismiss_message = '';
}

$gp.notices.element.removeClass().addClass('gp-js-message').addClass(css_class).html( '<div id="gp-js-message-content" class="gp-js-message-content">' + message + dismiss_message + '</div>');
Expand Down Expand Up @@ -52,7 +52,7 @@ $gp.showhide = function($) { return function(link, container, options) {
var $link = $(link);
var $container = $(container);
if ( !$gp.showhide.registry[options.group] ) $gp.showhide.registry[options.group] = [];
var registry = $gp.showhide.registry[options.group];
var registry = $gp.showhide.registry[options.group];
var show = function() {
for(var i = 0; i < registry.length; ++i) {
registry[i].hide();
Expand Down

0 comments on commit 9b1fbfc

Please sign in to comment.