Alt er feil i Internet Explorer

Internet Explorer har en irriterende feil – den viser alt-tekst for bilder som
tooltip såfremt det ikke eksisterer et title-attributt. Problemet lar seg
lett løse ved at man legger til et title-attributt med tom verdi for bildene
det gjelder. Litt slitsomt å måtte legge inn det overalt, så jeg laget et lite
script som ordner den biffen.

Scriptet kjører gjennom alle img-elementer når siden lastes, og legger til
et tomt title-attributt i de tilfellene der alt-attributtet har en verdi, mens
title-attributtet ikke har en verdi.

window.onload=fjernalttooltip;
function fjernalttooltip() {
bilder=document.getElementsByTagName("img");
for(i=0;i<bilder.length;i++) {
if(bilder[i].alt!="" && bilder[i].title.length<1) {
bilder[i].title="";
}
}
}

Puttes i en fil med navn ie.js, og inkluderes i dokumentet slik:

<!--[if IE]>
<script type="text/javascript" src="ie.js"></script>
<![endif]-->

Da blir filen kun hentet opp i IE, og man tenker ikke mer på saken. Filen kan også krydres med andre IE-spesifikke ting, som f.eks popups – om ikke annet så bare for moro skyld :-)

Dette innlegget ble publisert i Ukategorisert. Bokmerk permalenken.

2 kommentarer til Alt er feil i Internet Explorer

  1. rhizow sier:

    http://cialisbuymrxonline.com
    cialis non generic from canada
    buy cialis online
    generic cialis online pharmacy
    cialis

  2. aerock sier:

    http://viagramedmrx.com
    how to use viagra for best results
    cheap viagra
    walgreen viagra
    buy viagra online

  3. ScupVack sier:

    http://cialisbuymrxonline.com
    buy cialis online doctor
    generic cialis online
    buy cialis online without a rx cialis
    generic cialis online

  4. Dueveli sier:

    http://viagramedmrx.com
    is viagra sold over the counter
    buy viagra online
    brother puts viagra in drink
    generic viagra

  5. Admitnut sier:

    http://buymrxviagrarxonline.com
    generic cialis buy
    generic cialis
    buy cialis online in united states
    buy cialis

  6. poovecow sier:

    http://viagramedmrx.com
    viagra 50mg side effects
    buy viagra online
    viagra vs cialis price
    buy viagra

  7. Wholla sier:

    http://buymrxviagrarxonline.com
    cialis 5mg price prescription
    buy generic cialis
    daily side effects cialis tablets
    generic cialis

  8. zebmarf sier:

    http://buymrxviagrarxonline.com
    generic cialis 20mg best buy mexico online drugstore
    buy cialis
    cialis canadian pharmacy real cialis online
    buy cialis

  9. SHEERB sier:

    http://viagramedmrx.com
    what does viagra do to a woman
    viagra cheap
    viagra y sus efectos secundarios
    viagra cheap

  10. rhizow sier:

    http://cialisbuymrxonline.com
    canada cialis generic sudden hearing loss cialis
    buy cialis generic
    buy cialis online in california
    generic cialis online

  11. beamma sier:

    http://buymrxviagrarxonline.com
    viagra effect on blood pressure
    generic viagra
    cost of viagra vs cialis
    order viagra online

  12. Emambit sier:

    http://cialisbuymrxonline.com
    viagra tabletta cialis 20mg
    buy cialis online
    magnus sildenafil cialis generic pills
    cialis

  13. Endashy sier:

    http://cialisbuymrxonline.com
    viagra fact sheet cialis generic cialis
    buy cialis generic
    tadalafil api cialis generic
    cialis

  14. Wholla sier:

    http://viagramedmrx.com
    viagra coupon 2015
    cheap viagra
    viagra and cialis together
    viagra generic

  15. Lloydawabe sier:

    northwest pharmacy canada
    canadian pharmacies shipping to usa
    online pharmacy without scripts
    canadian pharmacies shipping to usa
    canada drugs

  16. FamybfStync sier:

    http://cialisonlinemane.com/ cialis generic price [url=http://cialisonlinemane.com/]cheapest cialis[/url] cialis online without prescription tadalafil cialis

  17. triffbaf sier:

    buy cheap cialis online
    paroxetine 75 mg cialis generic pills
    http://calismdmrxonline.com.com
    viagra dejstvo cialis pills generic
    cheap cialis

  18. Antefs sier:

    generic cialis online
    cialis canadian pharmacy cheap buy
    http://calismdmrxonline.com.com
    emedicine viagra cialis pills
    buy cialis online

  19. Immesse sier:

    cheap cialis online
    used cheap generic cialis
    http://calismdmrxonline.com.com
    low blood pressure canada buy generic cialis
    buy cialis online

  20. Preale sier:

    cheap cialis online
    where to order cialis online
    http://calismdmrxonline.com.com
    cialis online canadian pharmacy cialis
    generic cialis

  21. openna sier:

    buy cialis online
    generic cialis soft online buy
    http://calismdmrxonline.com.com
    cialis non generic from canada
    cheap cialis

  22. Inotte sier:

    cheap cialis
    buy cialis online doctor
    http://calismdmrxonline.com.com
    best place to buy cialis cialis
    generic cialis online

  23. Marilynsar sier:

    safe buy viagra online yahoo
    viagra online
    viagra online montreal
    viagra for sale
    get viagra new zealand

  24. Eroche sier:

    buy cialis
    magnus sildenafil cialis generic pills
    http://calismdmrxonline.com.com
    buy cialis online cheap
    buy cheap cialis online

  25. WilliamBrark sier:

    viagra generico nao funciona
    viagra without a doctor prescription
    best place to buy viagra uk
    viagra without prescription
    pills stronger than viagra

  26. Immesse sier:

    buy generic cialis
    brand cialis online pharmacy
    http://calismdmrxonline.com.com
    buy cialis next day delivery
    buy cialis online

  27. FamybfStync sier:

    http://cialisonlinemane.com/ cialis samples [url=http://cialisonlinemane.com/]purchase cialis[/url] where to buy cialis cialis reviews

Legg igjen en kommentar

Din e-postadresse vil ikke bli publisert. Obligatoriske felt er merket med *

Du kan bruke disse HTML-kodene og -egenskapene: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>