MrBoBo69

Code to Add link in whole column

Jul 24th, 2024
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.72 KB | Source Code | 0 0
  1. <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  2. <script>
  3. var $ = jQuery
  4. $(document).ready(function(){
  5.    
  6. $('.elementor-section[link], .elementor-column[link] >
  7. .elementor-widget-wrap, .e-con[link], .e-container[link]').on('click', function(){
  8.    
  9.     var $this = $(this).hasClass('elementor-widget-wrap') ? $(this).parent() : $(this),
  10.     link = $this.attr('link'),
  11.     newtab = $this.attr('newtab'),
  12.     openIn = typeof newtab !== 'undefined' && newtab !== false ? '_blank' : '_self'
  13.    
  14.     window.open(link, openIn)
  15. })
  16. })
  17. </script>
  18. <style>
  19. .elementor-section[link], .elementor-column[link] >
  20. .elementor-widget-wrap, .e-con[link], .e-container[link] {
  21.     cursor: pointer;
  22. }
  23. </style>
Tags: js jQuery
Advertisement
Add Comment
Please, Sign In to add comment