Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I solve append issue for an image using ajax
    primarykey
    data
    text
    <p>My first script provides to random image as you can see below</p> <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"&gt;&lt;/script&gt; &lt;!-- include Cycle plugin --&gt; &lt;script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.latest.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var $t = jQuery.noConflict(); $t(function () { $t('.slideshow').cycle({ fx: 'fade' }); }); &lt;/script&gt; </code></pre> <p>It works when I add some images like that</p> <pre><code>&lt;div class="news_area_left"&gt; &lt;div class="slideshow" style="position: relative; "&gt; &lt;img src="../../banner_image/nemo.jpg" width="154px" height="108px"/&gt; &lt;img src="../../banner_image/up.jpg" width="154px" height="108px" /&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>But when I add my second script which get images as you can see</p> <pre><code>&lt;script type="text/javascript"&gt; $(function () { $.ajax({ type: "get", url: "Home/Oku", data: {}, dataType: "json", success: function (data) { for (var i = 0; i &lt; data.length; i++) { var newFirmDiv= $(' &lt;img src="../../banner_image/' + data[i] + '" width="154px" height="108px"/&gt;'); $(".slideshow").append(newFirmDiv); } } }); }); &lt;/script&gt; </code></pre> <p>Finally I try to use my dynamic images in my "slideshow div" but the effect does not work </p> <pre><code>&lt;div class="news_area_left"&gt; &lt;div class="slideshow" style="position: relative; "&gt; &lt;/div&gt; &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload