HEX
Server: nginx/1.18.0
System: Linux srv01 5.15.0-171-generic #181-Ubuntu SMP Fri Feb 6 22:44:50 UTC 2026 x86_64
User: RaviMohan (1026)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/RaviMohan/sdrshilajit.com/web/wp-content/plugins/content-aware-sidebars/js/general.js
/*!
 * @package Content Aware Sidebars
 * @author Joachim Jensen <[email protected]>
 * @license GPLv3
 * @copyright 2018 by Joachim Jensen
 */

(function($) {
	"use strict";

	var cas_general = {

		init: function() {
			this.upgradeNoticeHandler();
			this.reviewNoticeHandler();
		},

		upgradeNoticeHandler: function() {
			$('.js-cas-pro-notice').on('click',function(e) {
				e.preventDefault();
				$('.js-cas-pro-read-more').attr('href',$(this).data('url'));
				$('.js-cas-pro-popup').trigger('click');
			});
		},

		/**
		 * Handle clicks on review notice
		 * Sends dismiss event to backend
		 *
		 * @since  3.1
		 * @return {void}
		 */
		reviewNoticeHandler: function() {
			var $notice = $(".js-cas-notice-review");
			$notice.on("click","a, button", function(e) {
				var $this = $(this);
				$.ajax({
					url: ajaxurl,
					data:{
						'action': 'cas_dismiss_review_notice',
						'dismiss': $this.data("cas-rating") ? 1 : 0
					},
					dataType: 'JSON',
					type: 'POST',
					success:function(data){
						$notice.fadeOut(400,function() {
							$notice.remove();
						});
					},
					error: function(xhr, desc, e) {
						console.log(xhr.responseText);
					}
				});
			});
		}
	};

	$(document).ready(function(){
		cas_general.init();
	});

})(jQuery);