Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/flexible-shipping-pro   php

Repository URL to install this package:

Version: 1.11.1 

/ wpdesk / wp-notice / assets / js / notice.js

jQuery( document ).on( 'click', '.notice-dismiss', function() {
    var notice_name = jQuery(this).closest('div.notice').data('notice-name');
    var source = jQuery(this).closest('div.notice').data('source');
    if ('' !== notice_name) {
        jQuery.ajax({
            url: ajaxurl,
            type: 'post',
            data: {
                action: 'wpdesk_notice_dismiss',
                notice_name: notice_name,
                source: source,
            },
            success: function (response) {
            }
        });
    }
});

jQuery( document ).on( 'click', '.notice-dismiss-link', function() {
    jQuery(this).closest('div.notice').data('source',jQuery(this).data('source'));
    jQuery(this).closest('div.notice').find('.notice-dismiss').click();
});