Search Results

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

Page 19/166 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Image Replacement (JS/JQuery) working in IE but not FF

    - by Sunburnt Ginger
    I have tried multiple solutions for replacing broken images (both JS & jQuery) and all work perfectly with IE but not in FF, is there a reason for this? Are images handled differently in FF that may cause this? JQuery Example: $("img").error(function(){ $(this).unbind("error").attr("src", "nopic.jpg"); }); Javascript Example: (triggered by onError event in img tag) function noimage(img){ img.onerror=""; img.src="nopic.jpg"; return true; } Both of these examples work perfectly in IE but not at all in FF. What gives? Thanks in advance!

    Read the article

  • JQuery remove image src prefix

    - by mtwallet
    Hi. I have a bunch of images on a page that are contained within a div with a class of content-block like this: <div class="content-block"> <img src="../images/path/path/image.jpg" alt="blah" title="blah" /> <img src="../images/path/path/image.jpg" alt="blah" title="blah" /> <img src="../images/path/path/image.jpg" alt="blah" title="blah" /> <img src="../images/path/path/image.jpg" alt="blah" title="blah" /> <img src="../images/path/path/image.jpg" alt="blah" title="blah" /> </div> I am loading this html into a div via ajax. When I load it in I need to remove the "../" before the image path, after it loads in so the path remains correct. Can this be done with JQuery? Many thanks in advance.

    Read the article

  • How to get a collection of divs with jquery?

    - by Gal Miller
    I want to get the second img: <form id="formElem" name="formElem" action="" method="post"> <fieldset class="step"> <img src="1.jpg" > </fieldset> <fieldset class="step"> <img src="2.jpg" > </fieldset> <fieldset class="step"> <img src="3.jpg" > </fieldset> </form> I tried doing something like: var imgSRC = $("div[id ='step']").get(1).find('img').attr('src'); alert(imgSRC); Got nothing....

    Read the article

  • Internet Explorer and Google Chrome different showup of content

    - by NDLombardi
    I'm setting up an online form where to choose boxes and stuff. I almost finished the whole thing when I said to my self "Let's try it in IE". This is the result I want and what comes up in Google Chrome: And this is what happens in IE: And this is the CSS and HTML for that part: <!--- HTML ---> <div id="choosen"><img src="img.jpg" class="center-img" /></div> /* --- CSS --- */ img.center-img{ margin-top:15px; position:relative; width: <?php echo $width; ?>px; left:50%; margin-left:-<?php echo $width/2; ?>px; } Basically the image is centered into the div as this page I'm writing will be included into another one which I never saw and someone else will do it.

    Read the article

  • Return color on hover

    - by alonblack
    Here i created 3 images that goes from color to grayscale and i want to show the color on hover what i'v done wrong? here is the fiddle link: http://jsfiddle.net/4tHWg/6/ css code: .box { float: left; position: relative; width: 14.285714286%; } .boxInner img { width: 100%; display: block; } .boxInner img:hover { -webkit-filter: grayscale(0%); } @-webkit-keyframes toGrayScale { to { -webkit-filter: grayscale(100%); } } .box:nth-child(1) img { -webkit-animation: toGrayScale 1s 0.5s forwards; } .box:nth-child(2) img { -webkit-animation: toGrayScale 2s 1s forwards; } .box:nth-child(3) img { -webkit-animation: toGrayScale 3s 1.5s forwards; }

    Read the article

  • Horizontally spacing a row of images evenly

    - by Tesla
    I have a few rows of images like so <div class="row"> <img src="image.jpg" alt=""> <img src="image.jpg" alt=""> <img src="image.jpg" alt=""> <img src="image.jpg" alt=""> <img src="image.jpg" alt=""> </div> Each image has a different width, and there is also a different number of images on each row (4-6). I want to space the images evenly in the row, the row has a fixed width of 960px. I could do this by calculating the total empty space for each row and then dividing it among the images for a margin, but I was hoping there was something simpler that I could apply to every row instead of having to calculate and code a separate one for each row.

    Read the article

  • Prevent "jQuery( html )" from triggering the browser to request images and other referenced content

    - by Chris Dutrow
    Using jQuery to create new DOM elements from text. Example: jQuery('<div><img src="/some_image.gif"></img></div>'); When this statement is executed, it causes the browser to request the file 'some_img.gif' from the server. Is there a way to execute this statement so that the resulting jQuery object can be used from DOM traversal, but not actually cause the browser to hit the server with requests for images and other referenced content? Example: var jquery_elememnts = jQuery('<div><img class="a_class" src="/some_image.gif"></img></div>'); var img_class = jquery_elememnts.find('img').attr('class'); The only idea I have now is to use regex to remove all of the 'src' tags from image elements and other things that will trigger the browser requests before using jQuery to evaluate the HTML. How can jQuery be used to evaluate HTML without triggering the browser to make requests to the server for referenced content inside the evaluated HTML? Thanks!

    Read the article

  • Jquery (this) selector help

    - by mtwallet
    Hi. I have the following HTML: <div class="box"><img src="pic.jpg" alt="image" /></div> <div class="box"><img src="pic.jpg" alt="image" /></div> <div class="box"><img src="pic.jpg" alt="image" /></div> <div class="box"><img src="pic.jpg" alt="image" /></div> I am trying to select the div and the child image both at the same time. I need to use $(this) to select the div. I know I can use $(this).children() or $(this).find('img') to get the image. Is there a way to select both the div and image using $(this) for the div.

    Read the article

  • Can't boot 12.04 installed alongside Windows 7

    - by PalaceChan
    I realize there are other questions like this one here, but I have visited them and tried several things and nothing is helping. One of them had a suggestion to boot the liveCD, and sudo mount /dev/sda* /mnt and to then chroot and reinstall grub. I did this and it did not help. Then on the Windows side, I downloaded a free version of easyBCD and chose to add a Grub2 Ubuntu 12.04 entry. On restart I saw this entry, but when I click on it it takes me to a Windows failed to boot error, as if it wasn't even trying to boot Ubuntu. I have booted from Ubuntu liveCD once again and have a snapshot of my GParted I ran this bootinfoscript thing from the liveCD, here are my results: It seems grub is on sda. I just want to be able to boot into my Ubuntu on startup. Boot Info Script 0.61 [1 April 2012] ============================= Boot Info Summary: =============================== = Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1041658947 of the same hard drive for core.img. core.img is at this location and looks for (,gpt7)/boot/grub on this drive. sda1: __________________________________________ File system: vfat Boot sector type: Windows 7: FAT32 Boot sector info: No errors found in the Boot Parameter Block. Operating System: Boot files: /efi/Boot/bootx64.efi sda2: __________________________________________ File system: Boot sector type: - Boot sector info: Mounting failed: mount: unknown filesystem type '' sda3: __________________________________________ File system: ntfs Boot sector type: Windows Vista/7: NTFS Boot sector info: No errors found in the Boot Parameter Block. Operating System: Windows 7 Boot files: /bootmgr /Boot/BCD /Windows/System32/winload.exe sda4: __________________________________________ File system: ntfs Boot sector type: Windows Vista/7: NTFS Boot sector info: No errors found in the Boot Parameter Block. Operating System: Boot files: sda5: __________________________________________ File system: ntfs Boot sector type: Windows Vista/7: NTFS Boot sector info: No errors found in the Boot Parameter Block. Operating System: Boot files: /bootmgr /boot/bcd sda6: __________________________________________ File system: BIOS Boot partition Boot sector type: Grub2's core.img Boot sector info: sda7: __________________________________________ File system: ext4 Boot sector type: Grub2 (v1.99) Boot sector info: Grub2 (v1.99) is installed in the boot sector of sda7 and looks at sector 1046637581 of the same hard drive for core.img. core.img is at this location and looks for (,gpt7)/boot/grub on this drive. Operating System: Ubuntu 12.04 LTS Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img sda8: __________________________________________ File system: swap Boot sector type: - Boot sector info: ============================ Drive/Partition Info: ============================= Drive: sda _______________________________________ Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes Partition Boot Start Sector End Sector # of Sectors Id System /dev/sda1 1 1,465,149,167 1,465,149,167 ee GPT GUID Partition Table detected. Partition Start Sector End Sector # of Sectors System /dev/sda1 2,048 411,647 409,600 EFI System partition /dev/sda2 411,648 673,791 262,144 Microsoft Reserved Partition (Windows) /dev/sda3 673,792 533,630,975 532,957,184 Data partition (Windows/Linux) /dev/sda4 533,630,976 1,041,658,946 508,027,971 Data partition (Windows/Linux) /dev/sda5 1,412,718,592 1,465,147,391 52,428,800 Windows Recovery Environment (Windows) /dev/sda6 1,041,658,947 1,041,660,900 1,954 BIOS Boot partition /dev/sda7 1,041,660,901 1,396,174,572 354,513,672 Data partition (Windows/Linux) /dev/sda8 1,396,174,573 1,412,718,591 16,544,019 Swap partition (Linux) blkid output: ____________________________________ Device UUID TYPE LABEL /dev/loop0 squashfs /dev/sda1 B498-319E vfat SYSTEM /dev/sda3 820C0DA30C0D92F9 ntfs OS /dev/sda4 168410AB84108EFD ntfs DATA /dev/sda5 AC7A43BA7A438056 ntfs Recovery /dev/sda7 42a5b598-4d8b-471b-987c-5ce8a0ce89a1 ext4 /dev/sda8 5732f1c7-fa51-45c3-96a4-7af3bff13278 swap /dev/sr0 iso9660 Ubuntu 12.04 LTS i386 ================================ Mount points: ================================= Device Mount_Point Type Options /dev/loop0 /rofs squashfs (ro,noatime) /dev/sr0 /cdrom iso9660 (ro,noatime) =========================== sda7/boot/grub/grub.cfg: =========================== How can I get this option? When I was using easyBCD, it kept saying I had no entries at all, so I did the add entry thing for Ubuntu many times and I see several of those on boot screen now. I'd love to get rid of all those unusable options.

    Read the article

  • Ubuntu 10.04 and fedora 14 grub conflict

    - by sawren
    I tried to triple boot Windows xp, Fedora 14 and Ubuntu 10.04. I first installed Windows xp, then fedora followed by Ubuntu. The problem is that i don't get option to boot Ubuntu while Xp boots fine. It seems Ubuntu was unable to replace Fedora's grub with its own at MBR. Looking at their grub conf file, Fedora and Ubuntu identifies same harddisk as two different devices and i do have another 80 GB harddisk which doesn't have any OS. Below is the details on my partitions and partial information from grub files of both OS. Device Boot Start End Blocks Id System /dev/sda1 * 63 40965749 20482843+ 7 HPFS/NTFS /dev/sda2 102414436 312576704 105081134+ f W95 Ext'd (LBA) /dev/sda3 40965750 102414374 30724312+ 83 Linux - /Home (for fedora) /dev/sda5 102414438 204812684 51199123+ 7 HPFS/NTFS /dev/sda6 204812748 253634219 24410736 83 Linux -- ubuntu /dev/sda7 253634283 302455754 24410736 83 Linux -- fedora /dev/sda8 302455818 312576704 5060443+ 82 Linux swap / Solaris grub.cfg from ubuntu ### BEGIN /etc/grub.d/10_linux ### menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,7)' search --no-floppy --fs-uuid --set cd55e078-a2c1-4d8a-9e87-ae838b6f4a05 linux /boot/vmlinuz-2.6.32-21-generic root=UUID=cd55e078-a2c1-4d8a-9e87-ae838b6f4a05 ro quiet splash initrd /boot/initrd.img-2.6.32-21-generic } menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,7)' search --no-floppy --fs-uuid --set cd55e078-a2c1-4d8a-9e87-ae838b6f4a05 echo 'Loading Linux 2.6.32-21-generic ...' linux /boot/vmlinuz-2.6.32-21-generic root=UUID=cd55e078-a2c1-4d8a-9e87-ae838b6f4a05 ro single echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.32-21-generic } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_memtest86+ ### menuentry "Memory test (memtest86+)" { insmod ext2 set root='(hd1,7)' search --no-floppy --fs-uuid --set cd55e078-a2c1-4d8a-9e87-ae838b6f4a05 linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod ext2 set root='(hd1,7)' search --no-floppy --fs-uuid --set cd55e078-a2c1-4d8a-9e87-ae838b6f4a05 linux16 /boot/memtest86+.bin console=ttyS0,115200n8 } ### END /etc/grub.d/20_memtest86+ ### ### BEGIN /etc/grub.d/30_os-prober ### menuentry "Microsoft Windows XP Professional (on /dev/sdb1)" { insmod ntfs set root='(hd1,1)' search --no-floppy --fs-uuid --set cad48cc6d48cb5eb drivemap -s (hd0) ${root} chainloader +1 } menuentry "Fedora (2.6.35.14-96.fc14.i686) (on /dev/sdb6)" { insmod ext2 set root='(hd1,6)' search --no-floppy --fs-uuid --set 6aee34cf-f77a-489a-9361-85d07194b84b linux /boot/vmlinuz-2.6.35.14-96.fc14.i686 ro root=UUID=6aee34cf-f77a-489a-9361-85d07194b84b rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet initrd /boot/initramfs-2.6.35.14-96.fc14.i686.img } menuentry "Fedora (2.6.35.6-45.fc14.i686) (on /dev/sdb6)" { insmod ext2 set root='(hd1,6)' search --no-floppy --fs-uuid --set 6aee34cf-f77a-489a-9361-85d07194b84b linux /boot/vmlinuz-2.6.35.6-45.fc14.i686 ro root=UUID=6aee34cf-f77a-489a-9361-85d07194b84b rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet initrd /boot/initramfs-2.6.35.6-45.fc14.i686.img } ### END /etc/grub.d/30_os-prober ### grub.conf from fedora default=0 timeout=5 splashimage=(hd0,5)/boot/grub/splash.xpm.gz hiddenmenu title Fedora (2.6.35.14-96.fc14.i686) root (hd0,5) kernel /boot/vmlinuz-2.6.35.14-96.fc14.i686 ro root=UUID=6aee34cf-f77a-489a-9361-85d07194b84b rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet initrd /boot/initramfs-2.6.35.14-96.fc14.i686.img title Fedora (2.6.35.6-45.fc14.i686) root (hd0,5) kernel /boot/vmlinuz-2.6.35.6-45.fc14.i686 ro root=UUID=6aee34cf-f77a-489a-9361-85d07194b84b rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet initrd /boot/initramfs-2.6.35.6-45.fc14.i686.img title Other rootnoverify (hd0,0) chainloader +1

    Read the article

  • nvidia driver problems after upgrading to 3.2.0-26 on Ubuntu 12.04 64bit

    - by Lev Levitsky
    After installing latest updates I can't set screen resolution higher than 1024x768; every time after the boot I get a message Could not apply the stored configuration for the monitors (Note: removing ~/.config/monitors.xml stopped the message, but not the problem) I can boot with 3.2.0-25 and the graphics look normal. Here's what I have in /var/log/apt/term.log (excerpt): Setting up linux-image-3.2.0-26-generic (3.2.0-26.41) ... Running depmod. update-initramfs: deferring update (hook will be called later) Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dkms 3.2.0-26-generic /boot/vmlinuz-3.2.0-26-generic Error! Problems with depmod detected. Automatically uninstalling this module. DKMS: Install Failed (depmod problems). Module rolled back to built state. run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-26-generic /boot/vmlinuz-3.2.0-26-generic update-initramfs: Generating /boot/initrd.img-3.2.0-26-generic run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-26-generic /boot/vmlinuz-3.2.0-26-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 3.2.0-26-generic /boot/vmlinuz-3.2.0-26-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-26-generic /boot/vmlinuz-3.2.0-26-generic Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.2.0-26-generic Found initrd image: /boot/initrd.img-3.2.0-26-generic Found linux image: /boot/vmlinuz-3.2.0-25-generic Found initrd image: /boot/initrd.img-3.2.0-25-generic Found linux image: /boot/vmlinuz-3.2.0-24-generic Found initrd image: /boot/initrd.img-3.2.0-24-generic Found linux image: /boot/vmlinuz-3.2.0-23-generic Found initrd image: /boot/initrd.img-3.2.0-23-generic Found linux image: /boot/vmlinuz-3.0.0-17-generic Found initrd image: /boot/initrd.img-3.0.0-17-generic Found memtest86+ image: /boot/memtest86+.bin I went to "additional drivers" and saw some updates available there, but an attempt to install them failed, leaving the following in /var/log/jockey.log (long log, pasted here). The full log won't fit in the question, so I'm showing $ fgrep 'ERROR' /var/log/jockey.log 2012-06-30 17:29:57,897 WARNING: modinfo for module vmxnet failed: ERROR: modinfo: could not find module vmxnet 2012-06-30 17:29:57,937 WARNING: modinfo for module wl failed: ERROR: modinfo: could not find module wl 2012-06-30 17:29:58,072 WARNING: modinfo for module nvidia_96 failed: ERROR: modinfo: could not find module nvidia_96 2012-06-30 17:29:58,240 WARNING: modinfo for module nvidia_current failed: ERROR: modinfo: could not find module nvidia_current 2012-06-30 17:29:58,293 WARNING: modinfo for module nvidia_current_updates failed: ERROR: modinfo: could not find module nvidia_current_updates 2012-06-30 17:29:58,351 WARNING: modinfo for module nvidia_173_updates failed: ERROR: modinfo: could not find module nvidia_173_updates 2012-06-30 17:29:58,385 WARNING: modinfo for module nvidia_173 failed: ERROR: modinfo: could not find module nvidia_173 2012-06-30 17:29:58,420 WARNING: modinfo for module nvidia_96_updates failed: ERROR: modinfo: could not find module nvidia_96_updates 2012-06-30 17:29:58,455 WARNING: modinfo for module ath_pci failed: ERROR: modinfo: could not find module ath_pci 2012-06-30 17:29:58,478 WARNING: modinfo for module fglrx_updates failed: ERROR: modinfo: could not find module fglrx_updates 2012-06-30 17:29:58,531 WARNING: modinfo for module fglrx failed: ERROR: modinfo: could not find module fglrx 2012-06-30 17:29:58,588 WARNING: modinfo for module omapdrm_pvr failed: ERROR: modinfo: could not find module omapdrm_pvr 2012-06-30 17:29:59,537 WARNING: modinfo for module nvidia_current failed: ERROR: modinfo: could not find module nvidia_current 2012-06-30 17:29:59,613 WARNING: modinfo for module nvidia_173_updates failed: ERROR: modinfo: could not find module nvidia_173_updates 2012-06-30 17:29:59,686 WARNING: modinfo for module nvidia_173 failed: ERROR: modinfo: could not find module nvidia_173 2012-06-30 17:29:59,764 WARNING: modinfo for module nvidia_current_updates failed: ERROR: modinfo: could not find module nvidia_current_updates 2012-06-30 17:30:29,544 WARNING: modinfo for module nvidia_current_updates failed: ERROR: modinfo: could not find module nvidia_current_updates 2012-06-30 17:30:29,545 ERROR: XorgDriverHandler.enable(): package or module not installed, aborting I'm not sure if it's a bug, as the first log shows some errors. What can I try?

    Read the article

  • Can't create more than one overlay in Seadragon

    - by XGreen
    Hi everyone, I am trying to add overlays to a seadragon map I am making but for some reason that I can not figure our seadragon ignores all my overlays except the first one. Any help with this is much appreciated. var viewer = null; function init() { Seadragon.Config.autoHideControls = false; viewer = new Seadragon.Viewer("container"); viewer.addEventListener("open", addOverlays); viewer.addControl(makeControl(), Seadragon.ControlAnchor.TOP_RIGHT); $(viewer.getNavControl()).parent().parent().css({ 'top': 10, 'right': 10 }); viewer.openDzi("_assets/Mapdata/dzc_output.xml"); } function makeControl() { var control = document.createElement("a"); var controlText = document.createTextNode(""); control.href = "#"; // so browser shows it as link control.className = "control"; control.appendChild(controlText); Seadragon.Utils.addEvent(control, "click", onControlClick); return control; } function onControlClick(event) { Seadragon.Utils.cancelEvent(event); // don't process link if (!viewer.isOpen()) { return; } // These are the coordinates of europe on this map var x = 0.5398693914203284; var y = 0.21155952391206562; var z = 5; viewer.viewport.panTo(new Seadragon.Point(x, y)); viewer.viewport.zoomTo(z); viewer.viewport.ensureVisible(); } function addOverlays(viewer) { drawer = viewer.drawer; var img = document.createElement("img"); img.src = "_assets/Images/pushpin.png"; $(img).addClass('pushPin'); var overlays = [ { elmt: img, point: new Seadragon.Point(0.51, 0.22) }, { elmt: img, point: new Seadragon.Point(0.20, 0.13) } ]; for (var i = 0; i < overlays.length; i++) { drawer.addOverlay(overlays[i].elmt, overlays[i].point); } } Seadragon.Utils.addEvent(window, "load", init);

    Read the article

  • CSS Hidden DIV Scroll to view

    - by Dasa
    <DIV CLASS="fact" ID="xnews-4" > <DIV CLASS="storyheadline"> <DIV CLASS="vote up"><A ID="xvotes-4" HREF="javascript:vote(0,258160,4,'f3d3d9c1885fb8508bdbde825d0dfd6e',10)">1</A><A ID="xvote-4" HREF="javascript:vote(0,258160,4,'f3d3d9c1885fb8508bdbde825d0dfd6e',10)"><strong>Vote</strong></A> </DIV> <DIV CLASS="title" ID="title-4"><H2><A HREF="/story.php?title=this-article-is-about-the-song">This article is about the song.</A></H2> </DIV> </DIV> <DIV CLASS="storycontent subtext hidden" ID="plus4" style="display: none;"> <DIV>Posted by <A HREF="/user.php?login=fact-o-matic">fact-o-matic</A> 2 minutes ago | Source: Editorial<SPAN ID="ls_adminlinks-4" style="display:none"> </SPAN> </DIV> <DIV> <DIV CLASS="floatleft"> <A HREF="/story.php?title=this-article-is-about-the-song"> Read More</A>&nbsp;|<SPAN ID="ls_comments_url-4"> <SPAN CLASS="linksummaryDiscuss"><A HREF="/story.php?title=this-article-is-about-the-song#discuss" CLASS="comments">Discuss</A></SPAN></SPAN> <SPAN ID="xreport-4"><SPAN CLASS="linksummaryBury">| <A HREF="javascript:vote(0,258160,4,'f3d3d9c1885fb8508bdbde825d0dfd6e',-10)">Bury</A></SPAN></SPAN> |&nbsp; <span id="emailto-4" style="display:none"></span><span id="linksummaryAddLink"> <a href="javascript://" onclick="var replydisplay=document.getElementById('addto-4').style.display ? '' : 'none';document.getElementById('addto-4').style.display = replydisplay;"> Add To</a>&nbsp; </span> <span id="addto-4" style="display:none"> <div style="position:absolute;display:block;background:#fff;padding:10px;margin:10px 0 0 100px;font-size:12px;border:2px solid #000;"> &nbsp;&nbsp;<a title="submit 'This article is about the song.' to del.icio.us" href="http://del.icio.us/post" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.factmeme.com%2Fstory.php%3Ftitle%3Dthis-article-is-about-the-song&amp;title=This+article+is+about+the+song.', '','toolbar=no,width=700,height=400'); return false;"><img src="http://www.factmeme.com/modules/social_bookmark/images/delicious.png" border="0" alt="submit 'This article is about the song.' to del.icio.us" /></a> &nbsp;&nbsp;<a title="submit 'This article is about the song.' to digg" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.factmeme.com%2Fstory.php%3Ftitle%3Dthis-article-is-about-the-song&amp;title=This article is about the song.&amp;bodytext="><img src="http://www.factmeme.com/modules/social_bookmark/images/digg.png" border="0" alt="submit 'This article is about the song.' to digg" /></a> &nbsp;&nbsp;<a title="submit 'This article is about the song.' to reddit" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.factmeme.com%2Fstory.php%3Ftitle%3Dthis-article-is-about-the-song&amp;title=This article is about the song."><img src="http://www.factmeme.com/modules/social_bookmark/images/reddit.gif" border="0" alt="submit 'This article is about the song.' to reddit" /></a> &nbsp;&nbsp;<a title="submit 'This article is about the song.' to facebook" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.factmeme.com%2Fstory.php%3Ftitle%3Dthis-article-is-about-the-song&t=This article is about the song."><img src="http://www.factmeme.com/modules/social_bookmark/images/facebook.gif" border="0" alt="submit 'This article is about the song.' to facebook" /></a> &nbsp;&nbsp;<a title="submit 'This article is about the song.' to technorati" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.factmeme.com%2Fstory.php%3Ftitle%3Dthis-article-is-about-the-song"><img src="http://www.factmeme.com/modules/social_bookmark/images/technorati.gif" border="0" alt="submit 'This article is about the song.' to technorati" /></a> &nbsp;&nbsp;<a title="submit 'This article is about the song.' to slashdot" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.factmeme.com%2Fstory.php%3Ftitle%3Dthis-article-is-about-the-song&title=This article is about the song."><img src="http://www.factmeme.com/modules/social_bookmark/images/slashdot.gif" border="0" alt="submit 'This article is about the song.' to slashdot" /></a> &nbsp;&nbsp;<a title="submit 'This article is about the song.' to Stumbleupon" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.factmeme.com%2Fstory.php%3Ftitle%3Dthis-article-is-about-the-song&amp;title=This article is about the song."><img src="http://www.factmeme.com/modules/social_bookmark/images/icon-stumbleupon.gif" border="0" alt="submit 'This article is about the song.' to Stumbleupon" /></a> &nbsp;&nbsp;<a title="submit 'This article is about the song.' to Windows Live" href="https://favorites.live.com/quickadd.aspx?url=http%3A%2F%2Fwww.factmeme.com%2Fstory.php%3Ftitle%3Dthis-article-is-about-the-song&title=This article is about the song."><img src="http://www.factmeme.com/modules/social_bookmark/images/windowslive.gif" border="0" alt="submit 'This article is about the song.' to Windows Live" /></a> &nbsp;&nbsp;<a title="submit 'This article is about the song.' to squidoo" href="http://www.squidoo.com/lensmaster/bookmark?http%3A%2F%2Fwww.factmeme.com%2Fstory.php%3Ftitle%3Dthis-article-is-about-the-song"><img src="http://www.factmeme.com/modules/social_bookmark/images/squidoo.gif" border="0" alt="submit 'This article is about the song.' to squidoo" /></a> &nbsp;&nbsp;<a title="submit 'This article is about the song.' to yahoo" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.factmeme.com%2Fstory.php%3Ftitle%3Dthis-article-is-about-the-song&amp;title=This article is about the song."><img src="http://www.factmeme.com/modules/social_bookmark/images/yahoomyweb.png" border="0" alt="submit 'This article is about the song.' to yahoo" /></a> &nbsp;&nbsp;<a title="submit 'This article is about the song.' to google" href="http://www.google.com/bookmarks/mark?op=edit&bkmk=http%3A%2F%2Fwww.factmeme.com%2Fstory.php%3Ftitle%3Dthis-article-is-about-the-song&title=This article is about the song."><img src="http://www.factmeme.com/modules/social_bookmark/images/googlebookmarks.gif" border="0" alt="submit 'This article is about the song.' to google" /></a> &nbsp;&nbsp;<a title="submit 'This article is about the song.' to ask" href=" http://myjeeves.ask.com/mysearch/BookmarkIt?v=1.2&t=webpages&url=http%3A%2F%2Fwww.factmeme.com%2Fstory.php%3Ftitle%3Dthis-article-is-about-the-song&title=This article is about the song."><img src="http://www.factmeme.com/modules/social_bookmark/images/ask.gif" border="0" alt="submit 'This article is about the song.' to ask" /></a> <hr /> <p style="font-size:16px;font-weight:bold;margin:0px;">Story URL</p> <script type="text/javascript"> function select_all() { var text_val=eval("document.storyurl.thisurl"); text_val.focus(); text_val.select(); } </script> <form name="storyurl"><input type="text" name="thisurl" size="92" onClick="select_all();" value="http://www.factmeme.com/story.php?title=this-article-is-about-the-song"></form> </div> </span> </DIV> <DIV CLASS="floatright"> <A HREF="/index.php?category=culture">Culture</A> | <A HREF="/search.php?search=Olavi&amp;tag=true">Olavi</A> <A HREF="/search.php?search=Olavi&amp;tag=true">All</A> </DIV> </DIV></DIV> <DIV CLASS="more show"></DIV> </DIV> when I click on the add to, a box is supposed to popup with options to add the story to other websites The problem is that nothing appears to happen, even though something is actually happening, the only way to see the add too box is to click on scroll to view in inspect element in firefox and even then the box appears in the wrong place I am almost certain that it is a positioning conflict but I cant work it out How can I fix it

    Read the article

  • jQuery Cycle plugin pagerAnchorBuilder images becoming undefined

    - by Casey Becking
    I have a slideshow built in flash that I want to mimic in jQuery. The slide show uses the images from the slideshow as the pager numbers. The problem im having is once i apply links to the slideshow images the pagerAnchorBuilder image returns an undefined for the src of the image. Javascript - $(function() { $('#slideshow').before('<ul id="nav">').cycle({ fx: 'fade', timeout: 7000, pager: '#nav', pagerAnchorBuilder: function(idx, slide) { return '<li><a href="#"><img src="' + slide.src + '" width="100" height="60" /></a></li>'; } }); }); HTML - <div id="slideshow" class="pics"> <a href="http://google.com"><img src="home_1.jpg" width="1000" height="600" /></a> <a href="http://google.com"><img src="home_2.jpg" width="1000" height="600" /></a> <a href="http://google.com"><img src="home_3.jpg" width="1000" height="600" /></a> <a href="http://google.com"><img src="home_4.jpg" width="1000" height="600" /></a> <a href="http://google.com"><img src="home_5.jpg" width="1000" height="600" /></a> </div> If i remove the href's from the slideshow the images in the pager show up without issues. Im not sure if this is a bug or something i need to find a fix for?

    Read the article

  • Did I find a bug in WriteableBitmap when using string literals

    - by liserdarts
    For performance reasons I'm converting a large list of images into a single image. This code does exactly what I want. Private Function FlattenControl(Control As UIElement) As Image Control.Measure(New Size(1000, 1000)) Control.Arrange(New Rect(0, 0, 1000, 1000)) Dim ImgSource As New Imaging.WriteableBitmap(1000, 1000) ImgSource.Render(Control, New TranslateTransform) ImgSource.Invalidate Dim Img As New Image Img.Source = ImgSource Return Img End Function I can add all the images into a canvas pass the canvas to this function and I get back one image. My code to load all the images looks like this. Public Function BuildTextures(Layer As GLEED2D.Layer) As FrameworkElement Dim Container As New Canvas For Each Item In Layer.Items If TypeOf Item Is GLEED2D.TextureItem Then Dim Texture = CType(Item, GLEED2D.TextureItem) Dim Url As New Uri(Texture.texture_filename, UriKind.Relative) Dim Img As New Image Img.Source = New Imaging.BitmapImage(Url) Container.Children.Add(Img) End If Next Return FlattenControl(Container) End Function The GLEED2D.Layer and GLEED2D.TextureItem classes are from the free level editor GLEED2D (http://www.gleed2d.de/). The texture_filename on every TextureItem is "Images/tree_clipart_pine_tree.png" This works just fine, but it's just a proof of concept. What I really need to do (among other things) is have the path to the image hard coded. If I replace Texture.texture_filename in the code above with the string literal "Images/tree_clipart_pine_tree.png" the images do not appear in the final merged image. I can add a breakpoint and see that the WriteableBitmap has all of it's pixels as 0 after the call to Invalidate. I have no idea how this could cause any sort of difference, but it gets stranger. If I remove the call to FlattenControl and just return the Canvas instead, the images are visible. It's only when I use the string literal with the WriableBitmap that the images do not appear. I promise you that the value in the texture_filename property is exactly "Images/tree_clipart_pine_tree.png". I'm using Silverlight 3 and I've also reproduced this in Silverlight 4. Any ideas?

    Read the article

  • Stretch Background Image Resizes With Browser Windows

    - by user241673
    I am trying to replicate the image resizing found at http://devkick.com/lab/fsgallery/ but with the code I have below, it is not working properly. When resizing the browser window to have small width and big height, white space shows up at the bottom of the page. feel free to see it & edit at http://jsbin.com/ifolu3 The CSS: html, body {width:100%; height:100%; overflow:hidden;} div.bg {position:absolute; width:200%; height:200%; top:-50%; left:-50%;} img.bg {min-height:50%; min-width:50%; margin:0 auto; display:block;} The JS/jQuery: $(window).resize(function(){ var ratio = Math.max($(window).width()/$('img.bg').width(),$(window).height()/$('img.bg').height()); if ($(window).width() $(window).height()) { $('img.bg').css({width:image.width()*ratio,height:'auto'}); } else { $('img.bg').css({width:'auto',height:image.height()*ratio}); } }); The HTML - (sorry for the formatting, had trouble getting "<" to show) [body] [div class="bg"] [img class="bg" src="bg.jpg" /] [/div] [/body]

    Read the article

  • jQuery filename manipulation

    - by Adi
    Hi all, I am trying to do a fancy blur/fade effect (which means i need 2 images) but I only want to load 1 in the HTML (in case js is not active) and add the other filename via jQuery (copying and renaming the file/src) The pure html is along the lines of: <div id="work"> <div> <img src="css/images/abc1.jpg" width="360" height="227" alt="" /> </div> <div> <img src="css/images/xyz1.jpg" width="360" height="227" alt="" /> </div> </div> But the html after jquery has manipulated the DOM needs to be like: <div id="work"> <div> <img src="css/images/abc0.jpg" width="360" height="227" alt="" /> <img src="css/images/abc1.jpg" width="360" height="227" alt="" /> </div> <div> <img src="css/images/xyz0.jpg" width="360" height="227" alt="" /> <img src="css/images/xyz1.jpg" width="360" height="227" alt="" /> </div> </div> The question is, what is the jQuery to clone/copy the relative images and then rename the src? Any help would be much appreicated. A.

    Read the article

  • Updating the value of a math equation with YUI slider and simple radio buttons.

    - by dj lewis
    I have a form that is used to show a price for a product. I have a YUI slider setup that changes the price, and it works perfectly. Now I'm trying to add in radio buttons that also should update that same price value. The price displayed should take into account all 3 fields, and update dynamically as any are updated. This is the code I have, but I don't have any radio buttons for cpanelPrice yet as I'm still just trying to get the IPs to work. <script type="text/javascript"> (function() { var Event = YAHOO.util.Event, Dom = YAHOO.util.Dom, lang = YAHOO.lang, slider, bg="slider-bg", thumb="slider-thumb", orderlink="order-link", monthlyprice="monthly-price", dram="ram", stor="storage",dcpu="cpu",bandw="bandwidth",slid="sliderbg" // The slider can move 0 pixels up var topConstraint = 0; // The slider can move 200 pixels down var bottomConstraint = 585; // Custom scale factor for converting the pixel offset into a real value var scaleFactor = 1; // The amount the slider moves when the value is changed with the arrow // keys var keyIncrement = 65; var tickSize = 65; Event.onDOMReady(function() { slider = YAHOO.widget.Slider.getHorizSlider(bg, thumb, topConstraint, bottomConstraint, tickSize); slider.setValue(1, true); slider.animate = true; slider.getRealValue = function() { return Math.round(this.getValue() * scaleFactor); } slider.subscribe("change", function(offsetFromStart) { var ordnode = Dom.get(orderlink); var prinode = Dom.get(monthlyprice); var ramnode = Dom.get(dram); var stornode = Dom.get(stor); var cpunode = Dom.get(dcpu); var bwnode = Dom.get(bandw); var slidnode = Dom.get(slid); var actualValue = slider.getRealValue(); if (actualValue < 0) { var actualValue = 0; } if (actualValue > -1 && actualValue < 5) { basePrice = 15; var pid = "7"; var ram = "128 MB"; stornode.innerHTML = "5"; cpunode.innerHTML = ".5"; bwnode.innerHTML = "50"; slidnode.innerHTML = "<img src=\"/images/sliderbg1.png\" alt=\"\" />"; } else if (actualValue > 60 && actualValue < 70) { basePrice = 25; var pid = "8"; var ram = "256 MB"; stornode.innerHTML = "10"; cpunode.innerHTML = ".5"; bwnode.innerHTML = "100"; slidnode.innerHTML = "<img src=\"/images/sliderbg2.png\" alt=\"\" />"; } else if (actualValue > 125 && actualValue < 135) { basePrice = 40; var pid = "9"; var ram = "512 MB"; stornode.innerHTML = "20"; cpunode.innerHTML = "1"; bwnode.innerHTML = "200"; slidnode.innerHTML = "<img src=\"/images/sliderbg3.png\" alt=\"\" />"; } else if (actualValue > 190 && actualValue < 200) { basePrice = 60; var pid = "10"; var ram = "1 GB"; stornode.innerHTML = "40"; cpunode.innerHTML = "1"; bwnode.innerHTML = "400"; slidnode.innerHTML = "<img src=\"/images/sliderbg4.png\" alt=\"\" />"; } else if (actualValue> 255 && actualValue < 265) { basePrice = 80; var pid = "11"; var ram = "1.5 GB"; stornode.innerHTML = "60"; cpunode.innerHTML = "1"; bwnode.innerHTML = "600"; slidnode.innerHTML = "<img src=\"/images/sliderbg5.png\" alt=\"\" />"; } else if (actualValue > 320 && actualValue < 330) { basePrice = 110; var pid = "12"; var ram = "2 GB"; stornode.innerHTML = "80"; cpunode.innerHTML = "2"; bwnode.innerHTML = "800"; slidnode.innerHTML = "<img src=\"/images/sliderbg6.png\" alt=\"\" />"; } else if (actualValue > 385 && actualValue < 395) { basePrice = 140; var pid = "13"; var ram = "2.5 GB"; stornode.innerHTML = "100"; cpunode.innerHTML = "2"; bwnode.innerHTML = "1000"; slidnode.innerHTML = "<img src=\"/images/sliderbg7.png\" alt=\"\" />"; } else if (actualValue > 450 && actualValue < 460) { basePrice = 170; var pid = "14"; var ram = "3 GB"; stornode.innerHTML = "120"; cpunode.innerHTML = "3"; bwnode.innerHTML = "1200"; slidnode.innerHTML = "<img src=\"/images/sliderbg8.png\" alt=\"\" />"; } else if (actualValue > 515 && actualValue < 525) { basePrice = 200; var pid = "15"; var ram = "3.5 GB"; stornode.innerHTML = "140"; cpunode.innerHTML = "3"; bwnode.innerHTML = "1400"; slidnode.innerHTML = "<img src=\"/images/sliderbg9.png\" alt=\"\" />"; } else if (actualValue > 580 && actualValue < 590) { basePrice = 240; var pid = "16"; var ram = "4 GB"; stornode.innerHTML = "160"; cpunode.innerHTML = "4"; bwnode.innerHTML = "1600"; slidnode.innerHTML = "<img src=\"/images/sliderbg10.png\" alt=\"\" />"; } // Setup the order link ordnode.innerHTML = "<a href=\"https://account.hostingbeast.com/cart.php?a=add&pid=" + pid + "\"><img src=\"/images/blank.gif\" alt=\"Order VPS Hosting\" height=\"100\" width=\"100\" /></a>"; ramnode.innerHTML = ram; ipPrice = 0; function setIpPrice(ips) { ipPrice = ips.value; } cpanelPrice = 0; prinode.innerHTML = basePrice + ipPrice + cpanelPrice; }); // Use setValue to reset the value to white: Event.on("putval", "click", function(e) { slider.setValue(100, false); //false here means to animate if possible }); setTimeout(function () { slider.setValue(10); },0); }); })(); </script> <div style="width: 649px; margin:auto"> <span id="sliderbg"></span> <div class="yui-skin-sam"> <div id="slider-bg" class="yui-h-slider" tabindex="-1"> <div id="slider-thumb" class="yui-slider-thumb"><img src="/images/thumb-bar.png"></div> </div> </div> </div> <div class="vpsdetails"> <div id="vpsprod"><span id="cpu"></span></div> <div id="vpsram"><span id="ram"></span></div> <div id="vpsstor"><span id="storage"></span> GB</div> <div id="vpsbw"><span id="bandwidth"></span> GB</div> <div id="slideprice">$ <span id="monthly-price"></span></div> </div> <input type="radio" name="ips" value="2" onclick="setIpPrice(this.value - 2 * 2);" checked="checked" /> 2 <input type="radio" name="ips" value="4" onclick="setIpPrice(this.value - 2 * 2);" /> 4

    Read the article

  • WPF RibbonTextBox Width problem

    - by morsanu
    Hey guys, It seems to me that the Ribbon control has a problem with textboxes. I was expecting a common TextBox control behaviour: a fixed width and a visible caret when the text exceeds the width. But the RibbonTextBox control changes its width and when the text exceeds the right limit, the overflow is not visible. I found a hack on a blog that does something like this: var img = SearchButton.Template.FindName("image", SearchButton); if (img != null && img is Image) (img as Image).Visibility = Visibility.Collapsed; var lbl = FindTemplateControl<Label>(SearchText); var border = SearchText.Template.FindName("Bd", SearchText); if (border != null && border is Border && img != null && lbl != null) { (border as Border).Width = SearchText.ActualWidth - (((Image)img).ActualWidth + lbl.ActualWidth); } but I reallly don't want to do such a workaround. Is there any other simpler way to achieve simple TextBox behaviour?

    Read the article

  • Firefox Sprite Sheet Image Not Showing Up

    - by ttony21
    I'm trying to create a chat room with emoticons. When a user types an emoticon such as :) in the chatroom, the CSS takes the proper image off the sprite sheet. But my code only seems to work in Opera and IE (odd combination). It doesn't show in Firefox or Chrome (if you manage to hone in exactly where the image should be, you can find the image blank.gif which is used as the stand-in to place the background-url over). Does anyone know what might cause this in Firefox/Chrome? Site: ttony21.byethost24.com Relevant CSS: image.emo { width:19px; height:19px; } image#smile { background:url(img/diceSprite.png) 0 0; } image#bigsmile { background:url(img/diceSprite.png) -19px 0; } etc... Relevant HTML: <img class="emo" id = "smile" src="img/blank.gif" width="1" height="1" alt=":)" title=":)" /> <img class="emo" id = "bigsmile" src="img/blank.gif" width="1" height="1" alt=":D" title=":D" /> etc...

    Read the article

  • Perl Imager::Screenshot not doing screenshot with default parameters

    - by Grigor
    I have the following code: use Imager::Screenshot 'screenshot'; my $img = screenshot(hwnd => 'active', left => 450, right => 200, top => 50, bottom => 50); $img->write(file => 'screenshot.png', type => 'png' ) || print "Failed: ", $img->{ERRSTR} , "\n"; it returns: "Can't call method "write" on undefined value at line 3" but when I do: use Imager::Screenshot 'screenshot'; my $img = screenshot(hwnd => 'active', left => 100, right => 300, top => 100, bottom => 300); $img->write(file => 'screenshot.png', type => 'png' ) || print "Failed: ", $img->{ERRSTR} , "\n"; it does take a screenshot. Why would the left, right, top and bottom values matter here?

    Read the article

  • i want the ruby code of the php code i have given inside , please help me out

    - by Arpit Vaishnav
    <?php // amcharts.com export to image utility // set image type (gif/png/jpeg) $imgtype = 'jpeg'; // set image quality (from 0 to 100, not applicable to gif) $imgquality = 100; // get data from $_POST or $_GET ? $data = &$_POST; // get image dimensions $width = (int) $data['width']; $height = (int) $data['height']; // create image object $img = imagecreatetruecolor($width, $height); // populate image with pixels for ($y = 0; $y < $height; $y++) { // innitialize $x = 0; // get row data $row = explode(',', $data['r'.$y]); // place row pixels $cnt = sizeof($row); for ($r = 0; $r < $cnt; $r++) { // get pixel(s) data $pixel = explode(':', $row[$r]); // get color $pixel[0] = str_pad($pixel[0], 6, '0', STR_PAD_LEFT); $cr = hexdec(substr($pixel[0], 0, 2)); $cg = hexdec(substr($pixel[0], 2, 2)); $cb = hexdec(substr($pixel[0], 4, 2)); // allocate color $color = imagecolorallocate($img, $cr, $cg, $cb); // place repeating pixels $repeat = isset($pixel[1]) ? (int) $pixel[1] : 1; for ($c = 0; $c < $repeat; $c++) { // place pixel imagesetpixel($img, $x, $y, $color); // iterate column $x++; } } } // set proper content type header('Content-type: image/'.$imgtype); header('Content-Disposition: attachment; filename="chart.'.$imgtype.'"'); // stream image $function = 'image'.$imgtype; if ($imgtype == 'gif') { $function($img); } else { $function($img, null, $imgquality); } // destroy imagedestroy($img); ?

    Read the article

  • CSS / jQuery Vertically and Horizontally Center DIV

    - by aherrick
    I'm trying to vertically and horizontally center this div even when there is content to scroll and the user is scrolling down the page. The following test works fine in IE, but in Firefox I get a weird flickering affect when hovering over the thumbnail image. Any thoughts? <html> <head> <title>aj</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $(function() { // img preview $('.img').hover(function() { if (!$('#overlay').length) { $('<div id="overlay"/>').css({ position: 'fixed', top: 0, left: 0, width: '100%', zIndex: 100, height: $(window).height() + 'px' }).appendTo('body'); $('<div id="item" />').css({ border: '7px solid #999', height: '500px', width: '500px', top: '50%', left: '50%', position: 'absolute', marginTop: '-250px', marginLeft: '-250px' }).append('<img src="' + $(this).attr('rel') + '" alt="img" />').appendTo('#overlay'); } }, function() { $('#overlay').remove(); }); }); </script> </head> <body> <img class="img" src="http://ajondeck.net/temp/paperboy_thumb.gif" rel="http://ajondeck.net/temp/paperboy.gif" alt="image" /> </body> </html>

    Read the article

  • Jquery menu with less code

    - by Sergio
    I'm using Jquery for menu created like: <div class="prof_info1">home</div><div class="prof_info2">info2</div><div class="prof_info3">info3</div> And Jquery code like: $(document).ready(function(){ $(".prof_info1").unbind("click").click(function(event) { $("#main").html('<img src="img/spin.gif" class="spin">'); location.replace("?&id=<?=$id?>") return false; }); $(".prof_info2").unbind("click").click(function(event) { $("#main").html('<img src="img/spin.gif" class="spin">'); $("#main").load('?a=2&id=<?=$id?>'); return false; }); $(".prof_info3").unbind("click").click(function(event) { $("#glavni").html('<img src="img/spin.gif" class="spin">'); $("#glavni").load('?a=3&id=<?=$id?>'); return false; }); }); Is there any easier way to do write this Jquery code and make it with less code? Something like if click somethind{ ... }elseif{ ....}

    Read the article

  • How do I get a UIView to appear instantly?

    - by matsgrip
    I'm trying to create an activity indicator in iPhone app. The problem is that I cannot get it to appear before the actual task i want it to diplay during is already done. Is there something funky about the order in which the iPhone does stuff? Here is my problematic code (in my app delegate): -(BOOL)showProgressView: (NSString *) message { self.progress = [[UIView alloc] initWithFrame:window.frame]; UIImageView *img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"squircle.png"]]; [img setAlpha:0.5]; [img setFrame:CGRectMake(94, 173, 133, 133)]; UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(51.5, 51.5, 30, 30)]; spinner.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge; [img addSubview:spinner]; [self.progress addSubview:img]; [spinner startAnimating]; [img release]; [spinner release]; [window addSubview:self.progress]; return YES; } I then call this code like this: if ([appDelegate showProgressView:@"Loading..:"]) { //My actual code loads data and stuff here but that is not important //drawCtrl is a UIViewController subclass that is instantiated here UINavigationController *navController = [appDelegate navigationController]; [navController pushViewController:drawCtrl animated:YES]; [drawCtrl release]; } The problem is that my activity indicator does not appear until the new view controller is pushed onto the navController's stack. Can I control this in some way? Thanks in advance! -Mats

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >