title: Detect either _self or _blank, parse URL in href to function and window.open(URL, '_self') or window.open(URL, '_blank')
body: <p>I had spent the past 2 days fixing malfunction <code>href=""</code> links after inserting certain jQuery <code>DIV</code>s scroller with scrollbar.</p>
  
  <p>I have <code>href=""</code> links in these DIVs, clicked on them but browser not doing anything, whether they are <code>_self</code> or <code>_blank</code>.</p>
  
  <p>Hence, the hack via <code>window.open()</code>, resulting either <code>window.open(URL, '_self')</code> or <code>window.open(URL, '_blank')</code>.</p>
  
  <p>I would like to create a jQuery function, via <code>.class</code> as selector, detect whether the original <code>href=""</code> is of target <code>_self</code> or <code>_blank</code>, and parse the URL from href to respective if else in the function and make the links work.</p>
  
  <p>to clear things up:</p>
  
  <p>conventional &lt;a href="http://www.google.com" target="_blank"&gt; or &lt;a href="http://www.yahoo.com" target="_self"&gt; doesn't work after applying above said jQuery content scroller.</p>
  
  <p>Hence, I worked around using &lt;a onclick="window.open('http://www.google.com/', '_blank');"&gt;</p>
  
  <p>However, I was trying to do this via a jQuery function instead doing inline everytime. This function is capable to detect whether target is _blank or _self, capture the URL and return back using window.open() with _blank or _self respectively.</p>