Link Open in New Tab Using Jquery - Lucifer's Code

Link Open in New Tab Using Jquery

February 27, 2021

this example not work propely in "output" section,because i use embeded code of codepen here : "see direct link"

in this how to open the page in a new tab using Jquery. using jquery code you can make "_blank" type behavior in your code. must your HTML structure have an "a" tag?,then this type of functionality use when a page created with a page builder (like wp-bakery,elementor, etc).

when creating a web page using any "page builder".you use a tag inside the div but clients want to open a link in a new tab then click on "content-box" then this example can help. suppose in many time create sections using "page builder" their components not allow or CSS not able to cover a tag cover any div tag, for making div tag clickable then you can use this jquery for add "_blank" target in the website.

in exampel i add link in a tag & wrap in div tag,after using jquery on click method apply on "box" div tag.using find method search "href" attribute in a tag.then using window.open open page in new tab.

  • all the design & layout created in 1920 x 1080 screen size.
  • all the design & layout is responsive in desktop,tablet & mobile view.
  • all the content, fonts & image are free resources.
HTML
CSS
JS
Output

this example not work propely in "output" section,because i use embeded code of codepen here : "see direct link"

Powered by Blogger.