Advertisement
fauzanjeg

Add Close Button for Header Top Ads and Mobile Sticky Ads || Only Image Ads

Sep 23rd, 2021
667
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.54 KB | None | 0 0
  1. /* Add Close Button for Header Top Ads and Mobile Sticky Ads || Only Image Ads */
  2. (function ($) {
  3.     var container = $('.jnews_header_top_ads, .jnews_mobile_sticky_ads'),
  4.         wrapper = container.find('.ads_image_phone');
  5.     wrapper.html(wrapper.html() + '<span id="close" onClick="hideImg()">X</span>');
  6.     wrapper.find('#close').css({ 'position': 'absolute', 'top': '0px', 'right': '0', 'font-size': '32px', 'cursor': 'pointer' });
  7.     wrapper.find('#close').click(function (e) {
  8.         e.preventDefault();
  9.         $(this).parent().parent().remove();
  10.     });
  11. })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement