I have a list with a images. When i click the image i want to highlight it. I also have a upload new image button, which uploads in list a new image. But when i click the uploaded images they don't highlight.  This is the code in snippet.    function changePhoto(input) {   if (input.files[0]) {     var reader = new FileReader();     reader.onload = function(e) {       var source = e.target.result;       $(".list").append("&lt;li&gt;&lt;img src=" + source + " class='image'&gt;&lt;/li&gt;")     }     reader.readAsDataURL(input.files[0]);   } }  $("#addPhoto").change(function() {   changePhoto(this); });  $('.image').click(function(){             $('.selected').removeClass('selected');             $(this).addClass('selected');         }); .image {   height: 100px;   width: 100px;   cursor:pointer; } .selected {   border: 1px solid blue; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;form action=""&gt;   &lt;input type="file" value="Add new image" id="addPhoto"&gt; &lt;/form&gt; &lt;ul class="list"&gt;   &lt;li&gt;&lt;img src="https://blog.shareaholic.com/wp-content/uploads/2015/06/shortlink.png" alt="" class="image"&gt;&lt;/li&gt;   &lt;li&gt;&lt;img src="http://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.png?v=c78bd457575a" alt="" class="image"&gt;&lt;/li&gt; &lt;/ul&gt;     And
112
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
111836
I really love the way  works, but unfortunately it doesn't look very sharp on a , especially when juxtaposed with browser-rendered text. If you made the generated image twice its current size, it would circumvent this problem.  Could you please generate larger source images? Keeping the same width and height HTML attributes will mean that the image won't look any different for current users, so there's no chance of anything breaking.  It's a small difference, but quality is in the details!
117949
I have small script that makes screenshot of selected area and then updates it on imgur  function uploadImage {     curl -s -F "image=@$1" -F "key=xxx" https://imgur.com/api/upload.xml | grep -E -o "&lt;original_image&gt;(.)*&lt;/original_image&gt;"  grep -E -o "http://i.imgur.com/[^&lt;]*" }  notify-send "Select screenshot area" FILENAME=$(date +"%d-%m-%Y_%T")".png" scrot -s $FILENAME  uploadImage $FILENAME | xclip -selection c notify-send "Screenshot $FILENAME uploaded. Link copied to clipboard."   i placed it in $home/screenshots/ directory. Everything works fine when i run it from terminal  ./screenshot.sh   but when i try to bind it to key using Default XFCE keybinder with command  bash /path/to/file/screenshot.sh   then it doesn't work. After pressing selected key, I get first norification, and second just moment after. It doesn't make any screenshot, it doesn't even wait for selection. How can i fix it?
94141
When I upload an image to Stack Overflow, I cannot see my JPEG file in my post. It's all blank. I've tried it with different files, but gotten the same result.
35836
I want to know when an image has finished loading. Is there a way to do it with a callback?  If not, is there a way to do it at all?
72526
When editing a profile’s “About me” section, or a tag wiki, and hitting CtrlG, or clicking the “Image” button from the formatting bar to insert an image, the Imgur upload modal dialog will appear. The same modal will also appear when uploading a profile picture. This is different from questions and answers where an uploader overlay bar (technically referred to as inline-dialog) appears. This modal dialog has an × button for closing, but it does nothing when clicked. I also can’t try tabbing to it and hit Enter, because it’s a regular &lt;div&gt; with no tabindex attribute, so it’s not tabbable and not an interactive element. (After manually inserting a tabindex and pressing Enter, it also did nothing, of course.)  There are no errors produced in the console of any browser. It doesn’t even seem to have any event listener bound to it. Pressing the Esc key or clicking outside of the modal dialog will dismiss the dialog, but the × button is currently useless. An obvious possible  would be to unify all Imgur upload dialogs to the way they appear on questions and answers, as an inline-dialog. But for the profile picture uploader, this dialog doesn’t have an obvious alternative, so in this instance, it’s necessary to redesign the close button so that it acts as a normal button (interactive element, tabbable) and closes the modal popup.  Related   and  — showing this modal in action; closing it used to work.  — for an older dialog design.
4670
I have an element that already has a class: &lt;div class=&quot;someclass&quot;&gt;     &lt;img ... id=&quot;image1&quot; name=&quot;image1&quot; /&gt; &lt;/div&gt;  Now, I want to create a JavaScript function that will add a class to the div (not replace, but add). How can I do that?
3086
When I try to upload an image, I'm presented with the following dialog box,    The dialog box does not allow uploading either from my computer or by posting a link.  This happens only on Chrome browser (running on Windows). Clearing cache and cookies, and restarting computer do not resolve.  Is this just my computer? Or is this a site-wide bug?  Additional info:  Clicking on 'click' to upload does nothing. Dragging an image onto dialog redirects me to the file location on my computer. Clicking 'Add picture' redirects me to http://[SE-domain].com/upload/image?https=true.  UPDATE: A Norton extension for Chrome was the source of the problem.
120595
I'm having this problem, same as ever, but never try to find the right solution  code:   &lt;div id="ListOfTextAndPhotos"&gt;       &lt;div style="border-bottom: solid 1px silver;"&gt;           &lt;img src="photo.jpg" style="float: left"&gt;           Some text about the photo       &lt;/div&gt;       &lt;div style="border-bottom: solid 1px silver;"&gt;           &lt;img src="photo2.jpg" style="float: left"&gt;           Some text about the photo2       &lt;/div&gt;       &lt;div style="border-bottom: solid 1px silver;"&gt;           &lt;img src="photo3.jpg" style="float: left"&gt;           Some text about the photo3       &lt;/div&gt;   &lt;/div&gt;   Question: How do I to keep the photo inside the DIV? with the separator line under the photo
18422
I have a web page that includes a bunch of images. Sometimes the image isn't available, so a broken image is displayed in the client's browser.  How do I use jQuery to get the set of images, filter it to broken images then replace the src?    --I thought it would be easier to do this with jQuery, but it turned out much easier to just use a pure JavaScript solution, that is, the one provided by Prestaul.
118800
I have created a list with type Choice and set Description for the same. I have set Radio Buttons as "Display Choices Using". When i click on Add New item the Description is shown at the bottom. Is there any way we can show the description on "Top" using Jquery/Designer/CSS with out loosing the UI Format. Attached image is an example  I know we can do it through infopath but i have some Java script in the Edit item.aspx page so using Infopath doesnot suite this requiremen
14827
I'm working on a 'sample request' implementation for a commerce site using , , sessions and a little custom code.  I'd like to add an icon or a symbol to let people know that an item they are viewing has been flagged.  I'm not sure exactly how to approach this, I can imagine perhaps adding a conditional field that displays an image or check box that is then changed by  or ajax, or perhaps something more complicated in JavaScript?  It could really be as simple as adding a checkbox that is checked or unchecked as the flag link is clicked or maybe even changing the css/html on click to be identified as marked.   Anyway, grateful for any advice here.
86062
How can I display an image which is stored in files?  For attachments I can use the code below, but it doen't work for files.  &lt;apex:image id="Stat1" URL="/servlet/servlet.FileDownload?file=0698E0000008w5e" width="15" height="15"/&gt;
33011
Let’s say I have many lists of this kind on a page:   Click on the Foo button. Tick the Bar box. Click on the Save button.   How should I emphasize Foo, Bar, and Save?   Bold?   Click on the Foo button. Tick the Bar box. Click on the Save button.  Italic?   Click on the Foo button. Tick the Bar box. Click on the Save button.  Quotes?   Click on the “Foo” button. Tick the “Bar” box. Click on the “Save” button.    NOTE: I want the lists to be read as easy as possible.
73867
I am trying to ask a question on SE, have some mock data in Excel I've copied, and am simply trying to paste in to my question.  I've done this before dozens of times, but suddenly am having this issue.  However, when I do so, I get prompted to upload an image. (This happens with Ctrl + V and also right click --> Paste):    Am I overlooking something?  Edit: Playing around, I can copy from Firefox/browsers and Word, and paste in to the box as usual. Excel seems to be the only one giving the issue so far.  Edit2:  are still having this issue.
26148
How can you thumbnail an uploaded image on Stack Overflow?
60509
We are using the following technique to lazy load images in our site:  For all images we put in the src attribute a url for a default img (i.e. a loader) and put the actual image url in the data-src attribute. Like so  &lt;img src="loader.gif" data-src="img1.jpg" /&gt;   When the image is outside of the viewport nothing happens, but when the image goes inside the viewport, then the url from the data-src attribute is loaded and the image is correctly shown.  This has as a result that Google sees all the images in the page (i.e. a search results page) as having the same src attribute. Because the google bot of course parses only the 'unloaded' img tag with the default src.  My question is: does having many img tags with the same src attribute affect the SEO of the page?