/* * Plugin JavaScript and jQuery code for the admin pages of website * * @package All Meta Tags * @uthor Arthur Gareginyan * @link https://www.arthurgareginyan.com * @copyright Copyright (c) 2016-2017 Arthur Gareginyan. All Rights Reserved. * @since 4.6 */ jQuery(document).ready(function($) { "use strict"; // Remove the 'successful' message after 3 seconds if ('.updated') { setTimeout(function() { $('.updated').fadeOut(); }, 3000); } // Add dynamic content to page tabs. Needed for having an up to date content. $('.include-tab-author').load('https://www.spacexchimp.com/assets/dynamic-content/plugins.html #include-tab-author'); $('.include-tab-store').load('https://www.spacexchimp.com/assets/dynamic-content/plugins.html #include-tab-store'); // Add questions and answers into spoilers and color them in different colors $('.panel-group .panel').each(function(i) { $('.question-' + (i+1) ).appendTo( $('h4', this) ); $('.answer-' + (i+1) ).appendTo( $('.panel-body', this) ); if ( $(this).find('h4 div').hasClass('question-red') ) { $(this).addClass('panel-danger'); } else { $(this).addClass('panel-info'); } }); });