Note that there are some explanatory texts on larger screens.

plurals
  1. POI would like to change these image's title tags into div tags
    text
    copied!<p>as you can see at <a href="http://www.thetotempole.ca/javascriptproject2.html" rel="nofollow">www.thetotempole.ca/javascriptproject2/</a> I have title attribute's that pop out when hovering over my table's image tags. Instead of titles I need div. Any help will be amazingly appreciated. Thanks guys!</p> <p>HTML: </p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /&gt; &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Arrays&lt;/title&gt; &lt;script&gt; $(function() { $( document ).tooltip(); }); &lt;/script&gt; &lt;style&gt; #tbl img { -webkit-transition: -webkit-transform 0.5s ease; transition: transform 0.5s ease; } #tbl td:hover img { -webkit-transform: scale(1.5); transform: scale(1.5); } td {text-align: center;} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;center&gt;&lt;table id="tbl" border="1"&gt; &lt;tr&gt; &lt;th&gt;Product Name&lt;/th&gt; &lt;th&gt;Product Description&lt;/th&gt; &lt;th&gt;Product Images&lt;/th&gt; &lt;/tr&gt; &lt;/table&gt; &lt;script&gt; var products = [ { name: "Apple", description: "It might be fruit, or it might be an iPhone", imageUrl: "images/apple.jpg", title: "www.apple.com/ca/iphone" }, { name: "Dell", description: "Buy this one online at dell.com", imageUrl: "images/dell.jpg", title: "www.dell.com/ca/p/laptops" }, { name: "IBM", description: "If you want a mainframe they still have some", imageUrl: "images/ibm.jpg", title: "oldcomputers.net/ibm5150.html" }, { name: "Toshiba", description: "Get a discount through SAIT (maybe)", imageUrl: "images/toshiba.jpg", title: "www.toshiba.com/us/computers" }, { name: "Atari", description: "Try a classic gaming machine", imageUrl: "images/atari.jpg", title: "www.nintendosforsale.com/" }, { name: "Commodore", description: "64k should be enough for anyone", imageUrl: "images/commodore.jpg", title: "http://oldcomputers.net/c64.html" } ]; var table = document.getElementById("tbl"); products.forEach(function(product) { var row = document.createElement("tr"); row.appendChild(createCell(product.name)); row.appendChild(createCell(product.description)); row.appendChild(createImageCell(product.imageUrl, product.title)); table.appendChild(row); }); function createCell(text) { var cell = document.createElement("td"); cell.innerText = text; return cell; } function createImageCell(url,title){ var image = document.createElement("img"); image.setAttribute("src", url); image.setAttribute("title",title); var cell = document.createElement("td"); cell.appendChild(image); return cell; } &lt;/script&gt; &lt;script&gt; // Table background color $("tr:even").css("backgroundColor" , "yellow"); $("tr:odd").css("backgroundColor" , "violet"); $("th").css("backgroundColor" , "green"); &lt;!-- End of jquery styling --&gt; &lt;/script&gt; &lt;/center&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
 

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