jebu1104
12/17/2016 - 2:48 AM

Add better WP links popup to function file. Create js/application.js and add the following to it and then the function after it to the func

Add better WP links popup to function file. Create js/application.js and add the following to it and then the function after it to the function file to call the js file.

jQuery.noConflict();
(function($) {
    $(function(){

        $('a.ext-link').on('click', function(event){
        var msg = 'ATTENTION – You are now leaving The Citizens Bank of Edina (the Bank) website. The Bank does not control nor is it responsible for the content of the site you are about to visit, nor does it guaranty the product(s) or service(s), or endorse the viewpoint or actions of the site owner. The Bank is not liable for any failure of the product(s) or service(s) advertised on the site nor does the Bank gain financially by providing this link. The site owner’s privacy policy may be different from that of the Bank. This site may provide less security than the Bank’s website.';
        return confirm(msg);


});
    });
})(jQuery);

function add_my_script()
{
    wp_enqueue_script(
        'custom-script',
        get_stylesheet_directory_uri() . '/js/application.js',
        array('jquery')
    );
}
add_action('wp_enqueue_scripts', 'add_my_script');