04.01.2010 · Dirk Schürjohann zum Thema jQuery.
2
Specs:
- filter external links (check the hostname)
- filter links marked as
rel="external"
- filter links in image maps (
area) as well
- text links only (do not contain
img, div or mailto): add CSS class .external providing an additional icon
- open external links in new window/tab
The code (jQuery):
$(document).ready(function(){
$('a, area').filter(function() {
return this.hostname && (this.hostname).split(":")[0]
!== (location.hostname).split(":")[0]
|| $(this).attr('rel') == 'external';
})
.not(':has(img, div, mailto)')
.addClass('external')
.end()
.click(function(e) {
open(this.href);
e.preventDefault();
});
});
Den ganzen Artikel lesen: »Mark external links and open in new window/tab (jQuery)«
07.07.2009 · Stefan Ullrich zum Thema Formulare, iPhone und jQuery.
64
or: Delayed password masking with JavaScript.
8/19/09 FYI: Upcoming version of the plugin will be released in a few days. It’s gonna fix the current issues very well.
Jakob Nielsen recently asked us to Stop Password Masking:
Usability suffers when users type in passwords and the only feedback they get is a row of bullets. Typically, masking passwords doesn’t even increase security, but it does cost you business due to login failures.
- useit.com/alertbox/passwords.html
He suggests using plain text input fields by default and offering a checkbox to have the passwords masked.
We do not completely go for the idea of typing passwords in plain text by default as there will be a loss of security! Not a technical one, but a user-driven one.
Password fields on iPhone/iPod touch
Of course Nielsen is right when he talks about users making more errors and feeling less confident when they can’t see what they’re typing while filling in forms. That may have been the reason why Apple developed implemented an alternative method on iPhone/iPod Touch: passwords get masked while typing but the last character in row is shown in plain text. Compared to common password fields on the web this method improves usability, not only on mobile devices. And concerning security risks you’ll probably need James Bond behind your back looking over your shoulders in order to let your password be captured.
So, this method looks to be a pretty good way of typing in passwords, and that is why tried to use it on web forms. It comes as a jQuery plugin which works unobtrusive. Non-JS users get the common masked password fields.
Copy & paste will work as usual. The only thing that will not work is: deleting/inserting single or multiple characters from the beginning/middle of the masked password string.
But, let’s face it, who will do that?
Live demo
Den ganzen Artikel lesen: »iPhone-like password fields using jQuery«