Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get a tag with jquery
    primarykey
    data
    text
    <p>Her is my html:</p> <pre><code> &lt;div class="product-img-box"&gt; &lt;p class="product-image product-image-zoom"&gt; &lt;a href='http://placehold.it/700x600' class='cloud-zoom' id='aMainImageZoom' rel="adjustX: 10, adjustY:-4"&gt; &lt;asp:Image Style="max-height: 400px; width: 400px;" ImageUrl="http://placehold.it/300x350" runat="server" ID="imgProductImageLarge" /&gt; &lt;/a&gt; &lt;/p&gt; &lt;div class="more-views"&gt; &lt;div class=" jcarousel-skin-tango"&gt; &lt;ul id="more_view"&gt; &lt;li&gt;&lt;a href='' class='cloud-zoom-gallery' title='Thumbnail 1' rel="useZoom: 'zoom1', smallImage: './images/zoom2.jpg' "&gt; &lt;asp:Image Style="max-height: 92px; width: 92px;" ImageUrl="http://placehold.it/300x351" ID="imgFirst" runat="server" onmouseover='changeImage("thImg5");' /&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>And here is my script code:</p> <pre><code> &lt;link href="css/cloud-zoom.css" rel="stylesheet" type="text/css" /&gt; &lt;script src="js/jquery-1.7.2.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="js/cloud-zoom.1.0.2.js" type="text/javascript"&gt;&lt;/script&gt; $(document).ready(function () { $(function () { $("#imgFirst").on("mouseenter", function () { $("#&lt;%=imgProductImageLarge.ClientID %&gt;").attr("src", this.src); $("#aMainImageZoom").attr("href", "http://placehold.it/700x602"); }); }); }); &lt;/script&gt; </code></pre> <p>Here is my html view-source:</p> <pre><code> &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" http://www.w3.org/TR/html4/loose.dtd&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt;&lt;title&gt; &lt;/title&gt;&lt;link href="css/cloud-zoom.css" rel="stylesheet" type="text/css" /&gt; &lt;script src="js/jquery-1.7.2.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="js/cloud-zoom.1.0.2.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $(function () { $("#imgFirst").on("mouseenter", function () { $("#imgProductImageLarge").attr("src", this.src); $("#aMainImageZoom").attr("href", "http://placehold.it/700x602e"); }); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form method="post" action="WebForm1.aspx" id="form1"&gt; &lt;div class="aspNetHidden"&gt; &lt;input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTUwNjA3NTE5MmRkpBlwGdNLH5SqyoT+HpJkrN3Qg3IyiI4/4Nchrs2wg+g=" /&gt; &lt;/div&gt; &lt;div class="product-img-box"&gt; &lt;p class="product-image product-image-zoom"&gt; &lt;a href='http://placehold.it/700x600' class='cloud-zoom' id='aMainImageZoom' rel="adjustX: 10, adjustY:-4"&gt; &lt;img id="imgProductImageLarge" class="mainImage" src="http://placehold.it/300x350" style="max-height: 400px; width: 400px;" /&gt; &lt;/a&gt; &lt;/p&gt; &lt;div class="more-views"&gt; &lt;div class=" jcarousel-skin-tango"&gt; &lt;ul id="more_view"&gt; &lt;li&gt;&lt;a href='' class='cloud-zoom-gallery' title='Thumbnail 1' rel="useZoom: 'zoom1', smallImage: './images/zoom2.jpg' "&gt; &lt;img id="imgFirst" src="http://placehold.it/300x351" style="max-height: 92px; width: 92px;" /&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I want to change aMainImageZoom href aMainImageZoom a on mouseover of imgFirst. But I couldn't get aMainImageZoom. Do you have any idea?</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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