<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: ZaakaJarimbo</title>
    <description>The latest articles on Forem by ZaakaJarimbo (@zaakajarimbo).</description>
    <link>https://forem.com/zaakajarimbo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1065742%2F241e7172-60a1-4ec0-92ab-95d8469c1b56.png</url>
      <title>Forem: ZaakaJarimbo</title>
      <link>https://forem.com/zaakajarimbo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/zaakajarimbo"/>
    <language>en</language>
    <item>
      <title>Why has this stopped working in JQuery</title>
      <dc:creator>ZaakaJarimbo</dc:creator>
      <pubDate>Sat, 15 Apr 2023 22:21:15 +0000</pubDate>
      <link>https://forem.com/zaakajarimbo/why-has-this-stopped-working-in-js-55cc</link>
      <guid>https://forem.com/zaakajarimbo/why-has-this-stopped-working-in-js-55cc</guid>
      <description>&lt;p&gt;I had a Javascript which opened a modal and then replaced the .modal-body content with the href content (load an external page into the modal body), however it seems to have stopped working. the script is below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$('.vs-modal').on('click', function(e){
      e.preventDefault();
//    alert("CLICK RECEIVED"+$(this).attr('href'));
      $('#ViewStarModal').modal('show').find('.modal-body').load($(this).attr('href'));
    });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;when the alert is uncommented the alert works so the script is still triggering and it displays the url, but the line after the alert shows the modal but no longer loads the href url&lt;br&gt;
&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
and here is the link/trigger created using php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;a class='btn btn-outline-success vs-modal' href='view-star.php?id=".$srow['id']."'&amp;gt;&amp;lt;i class='bi bi-eye'&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/a&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I just cant see why it has stopped working :(&lt;/p&gt;

&lt;p&gt;For some reason I can not post the source for the modal.&lt;/p&gt;

&lt;p&gt;USING jquery-3.6.4.js&lt;br&gt;
                  `&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>bootstrap</category>
      <category>modal</category>
    </item>
  </channel>
</rss>
