<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>airrl</author_name>
  <author_url>https://blog.hatena.ne.jp/airrl/</author_url>
  <blog_title>airy's blog</blog_title>
  <blog_url>https://airry.hatenablog.com/</blog_url>
  <categories>
    <anon>HTML/CSS/Sass</anon>
    <anon>JavaScript</anon>
    <anon>jQuery</anon>
    <anon>フロントエンド</anon>
    <anon>開発</anon>
  </categories>
  <description>問題 モーダル内で、aタグにhrefを使用してリンク先を指定していたのですが、何をしても外部リンクに飛べませんでした。 解決策 いろいろ調べましたが、HTML部分でどうにかするのは難しいようだったので、ちょうど使っていたjQueryで実装しました。 // 該当のaタグに &quot;link&quot; というクラスを適用。 // 複数リンクがあったため、return falseも記載。 $(&quot;.link&quot;).on('click',function() { window.open($(this).attr('href'), '_blank'); return false; }); JavaScriptで行う際には…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fairry.hatenablog.com%2Fentry%2Fjquery_link_outside_modal%2F&quot; title=&quot;【JavaScript/jQuery】モーダル内の外部リンクが飛べない - airy&amp;#39;s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-03-07 08:33:00</published>
  <title>【JavaScript/jQuery】モーダル内の外部リンクが飛べない</title>
  <type>rich</type>
  <url>https://airry.hatenablog.com/entry/jquery_link_outside_modal/</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
