Search Results

Search found 4135 results on 166 pages for 'img'.

Page 4/166 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Help with manipulating child/parent elements with jQuery

    - by Mohammad
    Currently I have this JQuery script var img = $(this); img.wrap('<div class="photo"></div>'); img.parent().append("<p>" + img.attr("alt") + "</p>"); which successfully turns the following: <img src="photo.jpg" alt="caption"> into this <div class="photo"> <img src="photos.jpg" alt="caption"/> <p>caption</p> </div> All is well unless the image has a link as a parent; <a href="#"><img since I want it to be correct html (I'm fussy) improving the resulting outcome bellow would be satisfactory <a href="#"> <div class="photo"> <img src="photos.jpg" alt="caption"/> <p>caption</p> </div> </a> to this: <div class="photo"> <a href="#"> <img src="photos.jpg" alt="caption"/> </a> <p><a href="#">caption</a></p> </div> </a> This is my jQuery script so far (which doesn't work bc I'm a noob) aha if(img.parent('a')){ var targetLink = img.parent('a').attr('href').val(); img.parent('a').wrap('<div class="photo"></div>'); img.parent('div').append('<p><a href="'+targetLink+'">' + img.attr("alt") + '</p></a>'); }else{ img.wrap('<div class="photo"></div>'); img.parent().append("<p>" + img.attr("alt") + "</p>"); }; Any advice, or help will be greatly appreciated : ) Thank You! Update *Answer* (works but looks sloppy) I'm editing it atm; if(img.parent('a').length){ var targetLink = img.parent().attr('href'); img.parent().wrap('<div class="photo"></div>'); var divTarget = img.parent('a').parent('div'); divTarget.append('<p><a href="'+targetLink+'">' + img.attr("alt") + '</p></a>'); }else{ img.wrap('<div class="photo"></div>'); img.parent().append("<p>" + img.attr("alt") + "</p>"); };

    Read the article

  • flex textarea text attribute but still renders as html

    - by David
    actually i got to the cause of the issue. if you feed the textarea text attribute with an tag that has a valid src url, then for some reason flex will try to render everything as html. Eg, try this: <mx:TextArea id="textArea" width="100%" height="90%" text="<img src='http://url-to-a-valid-img"/> and instead of it rendering it as raw text it will render it as an html. any idea?

    Read the article

  • vertical align img

    - by JK36
    I have a div called "images" which has a width of 277px. Within that div I have 9 images in it, just stored as tags. I've got the images to float left and line up quite nicely within my div, but I would like the images to align vertically, as some are portrait and others are landscape. I know I can do this if I enclose each image in a div, but the plugin I use to launch the gallery won't recognise which image is being fired, so i need to enclose them as just within the tags. This is the code I have, if someone can help me just align the images horizontally and vertically. I don't want the images to be skewed. #images_box a { float:left; padding:9px; width: 70px; height: 70px; text-align: center; vertical-align: middle; display: table-cell; } my data <div id="images"> <a class="fancybox" rel="gallery1" href="http://farm8.staticflickr.com/7069/7060779347_fbee5aae15_b.jpg" title="morning after[explored] (mariosworld343)"> <img src="http://farm8.staticflickr.com/7069/7060779347_fbee5aae15_m.jpg" alt="" /> </a> <a class="fancybox" rel="gallery1" href="http://farm8.staticflickr.com/7234/7047458501_46a2203733_b.jpg" title="Self confined... (TVidhya)"> <img src="http://farm8.staticflickr.com/7234/7047458501_46a2203733_m.jpg" alt="" /> </a> <a class="fancybox" rel="gallery1" href="http://farm8.staticflickr.com/7053/6918451990_20fa76f338_b.jpg" title="kleiner schrittmacher (KatjaGiersig)"> <img src="http://farm8.staticflickr.com/7053/6918451990_20fa76f338_m.jpg" alt="" /> </a> <a class="fancybox" rel="gallery1" href="http://farm8.staticflickr.com/7121/7059981833_abe404f4a0_b.jpg" title="(caro diario.)"> <img src="http://farm8.staticflickr.com/7121/7059981833_abe404f4a0_m.jpg" alt="" /> </a> </div>

    Read the article

  • JQuery Selector - Finding an img in a table

    - by CccTrash
    Cant seem to get the following to find the 'skull' button when the 'heart' button is clicked... Here is the JQuery... $(".voteup").click(function() { var id = $(this).attr("title"); var userID = $('[id$=HiddenFieldUserID]').val(); var ipAddress = $('[id$=HiddenFieldIPAddress]').val(); var skullButton = $(this).parent().siblings(".votedowntd").children("votedown"); registerUpVote("up", id, $(this), skullButton, userID, ipAddress); }); And the HTML... <table width="200px"> <td width="35px" class="votedowntd"> <img src='<%# (bool)Eval("skull") ? "images/skull.png" : "images/skull-bw.png" %>' alt="Vote Down" class="votedown" title='<%# Eval("entry.ID") %>' /> </td> <td width="130px" style="text-align: center;"> Num Votes Goes Here </td> <td width="35px" class="voteuptd"> <img src='<%# (bool)Eval("heart") ? "images/heart.png" : "images/heart-bw.png" %>' alt="Vote Up" class="voteup" title='<%# Eval("entry.ID") %>' /> </td> <tr> </tr> </table> So basically what I need to do is when one img is clicked, I need to find the other one. Why is what I have not working? Is there a better way to do this?

    Read the article

  • How to add dimensions to dynamic img elements (Updated)

    - by Mohammad
    I use a Json call to get a list of image addresses, then I add them individually to a div like this. Unfortunately the image dimension is not part of the Json information. <div id="container"> <img src="A.jpg" alt="" /> <img src="B.jpg" alt="" /> ... </div> Do any of you JQuery geniuses know of a code that would flawlessly and dynamically add the true Width and Height to each img element in the container as soon as each individual one is rendered? I was thinking maybe the code could do a image width check width > 0 to evaluate when the image has actually been rendered, then fire. But I wouldn't know how to go about that and make it work stably. How is the best way of going about this? Thank you so much! Update, As the answers point out, adding Width or Height to the elements is pretty routine. The problem here is actually writing a code that would know when to do that. And evaluate that condition for each image not the page as a whole.

    Read the article

  • JQUERY - how Two elements - IMG - DIV when hover over IMG show/hide the DIV - added with hover hide/

    - by Jan Fosgerau
    Im very new to the wonder that is jquery. and i just figure out how to make my img buttons show/hide with a opacity difference (as such) <script type="text/javascript"> <![CDATA[ $(".ExcommKnap").mouseover(function () { $(this).stop().fadeTo('fast', 0.5, function(){}) }); $(".ExcommKnap").mouseout(function () { $(this).stop().fadeTo('fast', 1.0, function(){}) }); ]]> </script> which is good and all. but i also need to make the button when hovered over show text just above it that is specific to that button. i made these here elements that are looped in a for each. <div style="top:10px; width:755px;text-align:right; position:absolute; "> <div id="Page-{@id}" class="headlinebox"> <xsl:value-of select="@nodeName"/> </div> </div> <a href="{umbraco.library:NiceUrl(@id)}"> <img class="ExcommKnap" src="{$media/data[@alias='umbracoFile']}" /> </a> i need to make the individual text appear when hovered over its button. hence i have the id="page-{@id}" looped out along and need to get this place in the jquery code i presume. so when i hover over a img class="ExcommKnap" it makes the correct text visible. But i need the div id="page-{id}" to be invisible to begin with on pageload and then visible when its button is being hovered over. can anyone help ?

    Read the article

  • how Two elements - IMG - DIV when hover over IMG show/hide the DIV - added with hover hide/show on i

    - by Jan Fosgerau
    Im very new to the wonder that is jquery. and i just figure out how to make my img buttons show/hide with a opacity difference (as such) <script type="text/javascript"> <![CDATA[ $(".ExcommKnap").mouseover(function () { $(this).stop().fadeTo('fast', 0.5, function(){}) }); $(".ExcommKnap").mouseout(function () { $(this).stop().fadeTo('fast', 1.0, function(){}) }); ]]> </script> which is good and all. but i also need to make the button when hovered over show text just above it that is specific to that button. i made these here elements that are looped in a for each. <div style="top:10px; width:755px;text-align:right; position:absolute; "> <div id="Page-{@id}" class="headlinebox"> <xsl:value-of select="@nodeName"/> </div> </div> <a href="{umbraco.library:NiceUrl(@id)}"> <img class="ExcommKnap" src="{$media/data[@alias='umbracoFile']}" /> </a> i need to make the individual text appear when hovered over its button. hence i have the id="page-{@id}" looped out along and need to get this place in the jquery code i presume. so when i hover over a img class="ExcommKnap" it makes the correct text visible. But i need the div id="page-{id}" to be invisible to begin with on pageload and then visible when its button is being hovered over. can anyone help ?

    Read the article

  • change img src on select box selection

    - by user1871596
    i have a form that auto populates input fields using jquery and ajax i can not get the img url to change in the img src when i select the option from dropdown my dropdown is dynamicaly populated here is is my function <script type="text/javascript"> $(document).ready(function(){ $("#id").change(function(){ $.ajax({ url : 'get_driver_data2.php', type : 'POST', dataType: 'json', data : $('#ContactTrucks').serialize(), success: function( data ) { for(var id in data) { $(id).val( data[id] ); } } }); }); }); </script> here is get_driver_data2.php <?php include ('dbc.php'); $id_selected = $_POST['id']; // Selected Id $query = "SELECT * from admin_dispatch_records where id = '$id_selected' AND driver LIKE '%$username%'"; $result = mysqli_query($dbcon, $query); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { $eta = $row['eta']; $time = $row['dispatch_time']; $date = $row['dispatch_date']; $name = $row['name']; $phone = $row['phone']; $vehicleyear = $row['vehicleyear']; $color = $row['color']; $make = $row['make']; $model = $row['model']; $vin = $row['vin']; $plate = $row['plate']; $mileage = $row['mileage']; $pickup = $row['pickup']; $dropoff = $row['dropoff']; $price = $row['price']; $invoice = $row['invoice']; $cash = $row['cash']; $credit = $row['credit']; $check = $row['check']; $po = $row['po']; $billed = $row['billed']; $need_to_bill = $row['need_to_bill']; $getphoto = $row['image_path']; } $arr = array( 'input#eta' => $eta, 'input#dispatch_time' => $time, 'input#dispatch_date' => $date, 'input#name' => $name, 'input#phone' => $phone, 'input#vehicleyear' => $vehicleyear, 'input#color' => $color, 'input#make' => $make, 'input#model' => $model, 'input#vin' => $vin, 'input#plate' => $plate, 'input#mileage' => $mileage, 'textarea#pickup' => $pickup, 'textarea#dropoff' => $dropoff, 'input#price' => $price, 'input#invoice' => $invoice, 'input#cash' => $cash, 'input#credit' => $credit, 'input#check' => $check, 'input#po' => $po, 'input#billed' => $billed, 'input#need_to_bill' => $need_to_bill, 'image#image_path' => $getphoto); echo json_encode( $arr ); ?> a bit of the html <td> <img id="image_path" src="????" /> </td> </tr> </table> <p><strong> <input type="submit" value="Complete Dispatch"> </strong></p> how do i if at all possible populate the src with the database vaule ajax recieved when i change the select box all other data is populated and the string is returned correctlly i have tested that by placing an input box and calling input#image_path = $getphoto. is there syntax for an img tag like the input....textarea....etc. I have tried including the get....php inline and assigning the src to $getphoto no luck there I was looking at trying to make a hidden input field with the ajax passed data and then taking that data and making it a var but can not figure that out either. thanks

    Read the article

  • Changing multiple objects with a new class name using Jquery

    - by liquilife
    I'd like to click on a trigger and show a specific image. There are multiple triggers which would show a specific image related to it within a set. There are 4 sets The challenge for me is toggling the other images to hide only in this 'set' when one of these triggers are clicked, as there can only be one image showing at a time in each set. Here is the HTML I've put together thus far: <!-- Thumbnails which can be clicked on to toggle the larger preview image --> <div class="materials"> <a href="javascript:;" id="shirtgrey"><img src="/grey_shirt.png" height="122" width="122" /></a> <a href="javascript:;" id="shirtred"><img src="red_shirt.png" height="122" width="122" /></a> <a href="javascript:;" id="shirtblue"><img src="hblue_shirt.png" height="122" width="122" /></a> <a href="javascript:;" id="shirtgreen"><img src="green_shirt.png" height="122" width="122" /></a> </div> <div class="collars"> <a href="javascript:;" id="collargrey"><img src="grey_collar.png" height="122" width="122" /></a> <a href="javascript:;" id="collarred"><img src="red_collar.png" height="122" width="122" /></a> <a href="javascript:;" id="collarblue"><img src="blue_collar.png" height="122" width="122" /></a> <a href="javascript:;" id="collargreen"><img src="green_collar.png" height="122" width="122" /></a> </div> <div class="cuffs"> <a href="javascript:;" id="cuffgrey"><img src="grey_cuff.png" height="122" width="122" /></a> <a href="javascript:;" id="cuffred"><img src="red_cuff.png" height="122" width="122" /></a> <a href="javascript:;" id="cuffblue"><img src="blue_cuff.png" height="122" width="122" /></a> <a href="javascript:;" id="cuffgreen"><img src="/green_cuff.png" height="122" width="122" /></a> </div> <div class="pockets"> <a href="javascript:;" id="pocketgrey"><img src="grey_pocket.png" height="122" width="122" /></a> <a href="javascript:;" id="pocketred"><img src=".png" height="122" width="122" /></a> <a href="javascript:;" id="pocketblue"><img src="blue_pocket.png" height="122" width="122" /></a> <a href="javascript:;" id="pocketgreen"><img src="green_pocket.png" height="122" width="122" /></a> </div> <!-- The larger images where one from each set should be viewable at one time, triggered by the thumb clicked above --> <div class="selectionimg"> <div class="selectShirt"> <img src="grey_shirt.png" height="250" width="250" class="selectShirtGrey show" /> <img src="red_shirt.png" height="250" width="250" class="selectShirtRed hide" /> <img src="blue_shirt.png" height="250" width="250" class="selectShirtBlue hide" /> <img src="green_shirt.png" height="250" width="250" class="selectShirtGreen hide" /> </div> <div class="selectCollar"> <img src="grey_collar.png" height="250" width="250" class="selectCollarGrey show" /> <img src="red_collar.png" height="250" width="250" class="selectCollarRed hide" /> <img src="blue_collar.png" height="250" width="250" class="selectCollarBlue hide" /> <img src="green_collar.png" height="250" width="250" class="selectCollarGreen hide" /> </div> <div class="selectCuff"> <img src="grey_cuff.png" height="250" width="250" class="selectCuffGrey show" /> <img src="red_cuff.png" height="250" width="250" class="selectCuffRed hide" /> <img src="blue_cuff.png" height="250" width="250" class="selectCuffBlue hide" /> <img src="green_cuff.png" height="250" width="250" class="selectCuffGreen hide" /> </div> <div class="selectPocket"> <img src="grey_pocket.png" height="250" width="250" class="selectPocketGrey show" /> <img src="hred_pocket.png" height="250" width="250" class="selectPocketRed hide" /> <img src="blue_pocket.png" height="250" width="250" class="selectPocketBlue hide" /> <img src="green_pocket.png" height="250" width="250" class="selectPocketGreen hide" /> </div> </div> How can jQuery be used to change a class of an image to "show" and ensure that all other images in that same div are set to a class of "hide"? First time posting here. I'm very efficient with HTML and CSS and have a basic understanding of jQuery. I'm learning and this just seems a little bit beyond my abilities at the moment. I hope this all makes sense. Thanks for any help.

    Read the article

  • How to implement jquery and Mootools together ?

    - by Avi Kumar Manku
    I am developing a website in which I am implementing two slider for images gallery using one with jQuery and one with moottools. But there is problem in implementing these because when I use both together the jQuery slider doesn't works where mootools slider works. jQuery slider works in case where I remove mootools. What should I do to implement both sliders together? Any suggestions will be helpful. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Tresmode | Footwear &amp; Accessories</title> <script type="text/javascript" src="js/jquery-1.5.min.js"></script> <script src="js/jquery.easing.1.3.js" type="text/javascript"></script> <script src="js/jquery.slideviewer.1.2.js" type="text/javascript"></script> <!-- Syntax hl --> <script src="js/jquery.syntax.min.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> $(window).bind("load", function() { $("div#mygaltop").slideView({toolTip: true, ttOpacity: 0.5}); $("div#mygalone").slideView(); //if leaved blank performs the default kind of animation (easeInOutExpo, 750) $("div#mygaltwo").slideView({ easeFunc: "easeInOutBounce", easeTime: 2200, toolTip: true }); $("div#mygalthree").slideView({ easeFunc: "easeInOutSine", easeTime: 100, uiBefore: true, ttOpacity: 0.5, toolTip: true }); }); $(function(){ $.syntax({root: 'http://www.gcmingati.net/wordpress/wp-content/themes/giancarlo-mingati/js/jquery-syntax/'}); }); </script> <link href="css/style.css" rel="stylesheet" type="text/css" /> <link href="css/product.css" rel="stylesheet" type="text/css" /> <link href="css/scroll.css" rel="stylesheet" type="text/css" /> <!--[if lte IE 8]> <link href="css/ieonly.css" rel="stylesheet" type="text/css" /> <![endif]--> <script language="javascript" type="text/javascript" src="js/mootools-1.2-core.js"></script> <script language="javascript" type="text/javascript" src="js/mootools-1.2-more.js"></script> <script language="javascript" type="text/javascript" src="js/SlideItMoo.js"></script> <script language="javascript" type="text/javascript"> window.addEvent('domready', function(){ /* thumbnails example , links only */ new SlideItMoo({itemsVisible:5, // the number of thumbnails that are visible currentElement: 0, // the current element. starts from 0. If you want to start the display with a specific thumbnail, change this thumbsContainer: 'thumbs', elementScrolled: 'thumb_container', overallContainer: 'gallery_container'}); /* thumbnails example , div containers */ new SlideItMoo({itemsVisible:5, // the number of thumbnails that are visible currentElement: 0, // the current element. starts from 0. If you want to start the display with a specific thumbnail, change this thumbsContainer: 'thumbs2', elementScrolled: 'thumb_container2', overallContainer: 'gallery_container2'}); /* banner rotator example */ new SlideItMoo({itemsVisible:1, // the number of thumbnails that are visible showControls:0, // show the next-previous buttons autoSlide:2500, // insert interval in milliseconds currentElement: 0, // the current element. starts from 0. If you want to start the display with a specific thumbnail, change this transition: Fx.Transitions.Bounce.easeOut, thumbsContainer: 'banners', elementScrolled: 'banner_container', overallContainer: 'banners_container'}); }); </script> </head> <body> <div id="landing"> <!-- landing page menu --> <div id="landing_menu"> <ul> <li><a class="active" href="#">SPECIALS</a></li> <li><a href="#">SHOP MEN'S</a></li> <li class="none"><a class="none" href="#">SHOP WOMEN'S</a></li> </ul> </div> <!-- landing page menu --> <!-- loading container menu --> <div id="container_part"> <div id="big_image_slider"> <!-- <img src="images/briteloves.png" alt="Britelove" /> --> <div id="mygaltop" class="svw"> <ul> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/briteloves.png" /></li> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/1.jpg" /></li> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/2.jpg" /></li> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/3.jpg" /></li> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/4.jpg" /></li> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/5.jpg" /></li> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/6.jpg" /></li> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/7.jpg" /></li> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/8.jpg" /></li> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/9.jpg" /></li> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/10.jpg" /></li> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/11.jpg" /></li> <li><img alt="Tresmode | Footwear &amp; Accessories" src="images/12.jpg" /></li> </ul> </div> </div> <div class="new_style_banner"><img src="images/new_styles.png" alt="new style" /></div> <div class="new_style_banner"><img src="images/ford-super-models.png" alt="ford super models" /></div> </div> <!--- loading container menu --> <!-- footer scrool ---> <div id="footer_scroll"> <!--thumbnails slideshow begin--> <div id="gallery_container"> <div id="thumb_container"> <div id="thumbs"> <a href="gallery/full/DC080302018.jpg" rel="lightbox[galerie]" target="_blank"><img src="gallery/thumb/1.jpg"/></a> <a href="gallery/full/DC080302028.jpg" rel="lightbox[galerie]" target="_blank"><img src="gallery/thumb/2.jpg" /></a> <a href="gallery/full/DC080302030.jpg" rel="lightbox[galerie]" target="_blank"><img src="gallery/thumb/3.jpg"/></a> <a href="gallery/full/DC080302018.jpg" rel="lightbox[galerie]" target="_blank"><img src="gallery/thumb/4.jpg" /></a> <a href="gallery/full/DC080302028.jpg" rel="lightbox[galerie]" target="_blank"><img src="gallery/thumb/5.jpg" /></a> <a href="gallery/full/DC080302030.jpg" rel="lightbox[galerie]" target="_blank"><img src="gallery/thumb/6.jpg"/></a> <a href="gallery/full/DC080302018.jpg" rel="lightbox[galerie]" target="_blank"><img src="gallery/thumb/1.jpg"/></a> <a href="gallery/full/DC080302028.jpg" rel="lightbox[galerie]" target="_blank"><img src="gallery/thumb/2.jpg" /></a> <a href="gallery/full/DC080302030.jpg" rel="lightbox[galerie]" target="_blank"><img src="gallery/thumb/7.jpg"/></a> <a href="gallery/full/DC080302018.jpg" rel="lightbox[galerie]" target="_blank"><img src="gallery/thumb/8.jpg" /></a> <a href="gallery/full/DC080302028.jpg" rel="lightbox[galerie]" target="_blank"><img src="gallery/thumb/9.jpg" /></a> <a href="gallery/full/DC080302030.jpg" rel="lightbox[galerie]" target="_blank"><img src="gallery/thumb/10.jpg"/></a> </div> </div> </div> <!--thumbnails slideshow end--> </div> <!-- foooter scrooll --> </div> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-2064812-2"); pageTracker._initData(); pageTracker._trackPageview(); </script> </body> </html>

    Read the article

  • conversion of a VMDK image with qemu-img failed with "error while reading sector 131072: Invalid argument"

    - by Erik Sjölund
    I tried to convert a VMDK image found in a OVA file to the QCOW2 format with the qemu-img command but it failed with the error message qemu-img: error while reading sector 131072: Invalid argument user@ubuntu:/tmp$ wget ftp://ftp.sanger.ac.uk/pub/databases/Pfam/vm/PfamWeb_20120124.ova user@ubuntu:/tmp$ tar xfv PfamWeb_20120124.ova PfamWeb_20120124_2.ovf PfamWeb_20120124_2.mf PfamWeb_20120124_2-disk1.vmdk user@ubuntu:/tmp$ qemu-img convert -O qcow2 PfamWeb_20120124_2-disk1.vmdk PfamWeb_20120124_2.qcow2 qemu-img: error while reading sector 131072: Invalid argument user@ubuntu:/tmp$ qemu-img --version | grep "qemu-img version" qemu-img version 1.0, Copyright (c) 2004-2008 Fabrice Bellard user@ubuntu:/tmp$ dpkg-query -f='${Version}\n' --show qemu-utils 1.0+noroms-0ubuntu14.1 user@ubuntu:/tmp$ cat /etc/issue Ubuntu 12.04.1 LTS \n \l How do I avoid the error?

    Read the article

  • can JLabel have img tags

    - by Aly
    Hi, I am trying to display a JLabel which has a few lines of text and an image as follows: String html = "<html> hello </br> <img src = \"/absolute/path/here\" height = \"30\" width =\"40\"/> </html>"; JLabel l = new JLabel(html); For the image all I get is a broken image, is it possible to nest img tags inside a JLabel? EDIT: I want to add multiple images to the JLabel so I don't think the use of an ImageIcon will do here. Thanks

    Read the article

  • How to add dimensions to dynamic img elements

    - by Mohammad
    I use a Json call to get a list of image addresses, then I add them individually to a div like this. <div id="container"> <img src="A.jpg" alt="" /> <img src="B.jpg" alt="" /> ... </div> Unfortunately the image dimension is not part of the Json information but I do need them for later JQuery DOM interactivity. Do any of you JQuery geniuses know of a code that would flawlessly add the width and height to the individual image elements in the container after they load? I was thinking maybe the code could wait for the images to have a width bigger than 5px then add the new width and height to the element. But I wouldn't know how to go about that and make it work stably. Thank you so much!

    Read the article

  • clickable div with img in it?

    - by acidzombie24
    I have a div i would like to make clickable. I know i need to make the div (and?) the link have a fixed width and height + display: block. I have an imagine inside of the div. It seems like the 'clickable' div is actually a large transparent link and this click does not play well with images as it doesnt share space. I need to right click the image and hit save as. So how do i make the div clickable. I tried setting the img width and height but it made the img stretch.

    Read the article

  • Removing whitespace between HTML elements when using line breaks

    - by Skilldrick
    I have a page with a row of about 10 imgs. For readability of the HTML, I want to put a linebreak in between each img tag, but doing so renders whitespace between the images, which I do not want. Is there anything I can do other than break in the middle of the tags rather than between them? Edit: Here is a screenshot of what I have so far. I would like the book spine images to display in random combinations, using PHP. This is why I need separate img tags.

    Read the article

  • On site load, how do you wrap all images in a link dynamically using Javascript?

    - by akaii
    I have barely any experience working with DOM and using Javascript, and I have a very specific task that I'm trying to accomplish. Let's say I have an image in my HTML: <img src="foo.jpg" /> When the site loads, I want to take that image (all images in the document, actually), and wrap them in a link: <a href="http://www.foobar.com"><img src="foo.jpg" /></a> What could I use to accomplish this? Google hasn't turned up much for me with regards to this specific task. On load, I can access and iterate all the images in the document... but I'm not sure where to go from there in order to wrap the image in a link.

    Read the article

  • How do I create and append an image with Javascript/jQuery?

    - by Chris Armstrong
    I'm using the following code to create an image element, load it, then append it to the article on load. $('<img />') .attr('src', 'image.png') //actually imageData[0].url .load(function(){ $('article').append( $(this) ); alert('image added'); }); The alert is firing off ok, but the image doesn't appear, and when I inspect the element it has been added without the closing slash <img src='image.png' > Why is the browser removing the forward slash and how do I stop it?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >