Olaf Bosch schreef: > David Duymelinck schrieb: > > >>> What about this? >>> >>> >>> >> With the #text a links your own links don't show the favicon in FF2 and IE7 >> > > :) it's a feature, no Favicon with *intern* links, this Script is for > external Links > The last 2 Links are to my domain, for testing, > href="www.my.de" and href="../" > > and this all automatic. > > Thank you for your Feedback. > > Ok i will stop posting at the end of the day :) anyway nice plugin in, i like it better then showing an icon that users can interpret differently but what happens if a site doesn"t have a favicon? If i look at your code nothing will happen. maybe you could add an option to display a default icon. I don't know how you could check if an emoticon exists or not. I think it should check the title attribute so it's not nessesary to add a title through javascript.
My shot at the plugin : jQuery.fn.favicon = function (settings) { settings = jQuery.extend({ place: "right" }, settings); return this.each(function() { var hoststring = /^http:/; var hrefvalue = this.getAttribute("href"); if (hrefvalue.search(hoststring) != -1) { var domain = this.hostname; if (domain != document.location.hostname) { if(jQuery(this).attr("title") == ""){ jQuery(this).attr({ title: ""+titletxt+" "+hrefvalue+"" }) } var cuesrc = "http://"+domain+"/favicon.ico"; jQuery(this).css({ background: "transparent url("+cuesrc+") no-repeat "+settings.place+" center", "padding-right": "19px", "white-space": "nowrap"}); } } }); }; -- David Duymelinck ________________ [EMAIL PROTECTED] _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/