[jQuery] Re: [Attrib external not working...]

2009-09-22 Thread Liam Byrne


Maybe because 'rel=external' doesn't have any meaning or functionality ?

The proper syntax with functionality would be a target=_blank 
href=http://www.google.com;google/a but that's just HTML; it has 
nothing to do with jQuery


Liam

Lord Gustavo Miguel Angel wrote:

Hi,
 
Why this code not working?
 
a rel=external href=www.google.comgoogle/a
 
url www.google.com http://www.google.com open in same windows.
 
 
Thank´s




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.409 / Virus Database: 270.13.112/2388 - Release Date: 09/22/09 05:51:00


  




[jQuery] Re: [Attrib external not working...]

2009-09-22 Thread Sam Doyle

$(document).ready(function(){
$(a rel='external').attr(target,_blank);
});


[jQuery] Re: [Attrib external not working...]

2009-09-22 Thread Liam Potter


Except that target=_blank is deprecated in xhtml 1.1, so to make sure 
you're markup validates, you need to use javascript to make links open 
in a new window/tab.


One way to do it is like this.

$(a[rel='external']).click(function(){
   this.target = _blank;
   });

Liam Byrne wrote:


Maybe because 'rel=external' doesn't have any meaning or 
functionality ?


The proper syntax with functionality would be a target=_blank 
href=http://www.google.com;google/a but that's just HTML; it has 
nothing to do with jQuery


Liam

Lord Gustavo Miguel Angel wrote:

Hi,
 
Why this code not working?
 
a rel=external href=www.google.comgoogle/a
 
url www.google.com http://www.google.com open in same windows.
 
 
Thank´s




No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 
270.13.112/2388 - Release Date: 09/22/09 05:51:00


  






[jQuery] Re: [Attrib external not working...]

2009-09-22 Thread Sam Doyle

$(document).ready(function(){
$(a [rel='external]').attr(target,_blank);
});

Sorry


[jQuery] Re: [Attrib external not working...]

2009-09-22 Thread Rick Faircloth

Now why would target=_blank be deprecated without a suitable HTML
substitute, requiring coders to have to resort to js for the functionality?

Odd...

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Liam Potter
Sent: Tuesday, September 22, 2009 10:20 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: [Attrib external not working...]


Except that target=_blank is deprecated in xhtml 1.1, so to make sure 
you're markup validates, you need to use javascript to make links open 
in a new window/tab.

One way to do it is like this.

$(a[rel='external']).click(function(){
this.target = _blank;
});

Liam Byrne wrote:

 Maybe because 'rel=external' doesn't have any meaning or 
 functionality ?

 The proper syntax with functionality would be a target=_blank 
 href=http://www.google.com;google/a but that's just HTML; it has 
 nothing to do with jQuery

 Liam

 Lord Gustavo Miguel Angel wrote:
 Hi,
  
 Why this code not working?
  
 a rel=external href=www.google.comgoogle/a
  
 url www.google.com http://www.google.com open in same windows.
  
  
 Thank´s
 


 No virus found in this incoming message.
 Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 
 270.13.112/2388 - Release Date: 09/22/09 05:51:00

   






[jQuery] Re: [Attrib external not working...]

2009-09-22 Thread Liam Potter


I have no idea, I think it was a stupid choice, I believe the reason 
behind it was that people should be able to choose how to open a link, 
and forcing a new window removes this choice, and confuses the user, 
because the back button stops working.


I prefer external sites to open in a new window/tab, I almost expect 
them to.


Rick Faircloth wrote:

Now why would target=_blank be deprecated without a suitable HTML
substitute, requiring coders to have to resort to js for the functionality?

Odd...

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Liam Potter
Sent: Tuesday, September 22, 2009 10:20 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: [Attrib external not working...]


Except that target=_blank is deprecated in xhtml 1.1, so to make sure 
you're markup validates, you need to use javascript to make links open 
in a new window/tab.


One way to do it is like this.

$(a[rel='external']).click(function(){
this.target = _blank;
});

Liam Byrne wrote:
  
Maybe because 'rel=external' doesn't have any meaning or 
functionality ?


The proper syntax with functionality would be a target=_blank 
href=http://www.google.com;google/a but that's just HTML; it has 
nothing to do with jQuery


Liam

Lord Gustavo Miguel Angel wrote:


Hi,
 
Why this code not working?
 
a rel=external href=www.google.comgoogle/a
 
url www.google.com http://www.google.com open in same windows.
 
 
Thank´s




No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 
270.13.112/2388 - Release Date: 09/22/09 05:51:00


  
  




  




[jQuery] Re: [Attrib external not working...]

2009-09-22 Thread Ricardo

I don't. That's the reason :)

What you should do is indicate when a link leads to a external site,
via an icon or formatting, like Wikipedia articles.

In XHTML 1.0 Transitional target is still valid.

-- ricardo

On Sep 22, 11:47 am, Liam Potter radioactiv...@gmail.com wrote:
 I have no idea, I think it was a stupid choice, I believe the reason
 behind it was that people should be able to choose how to open a link,
 and forcing a new window removes this choice, and confuses the user,
 because the back button stops working.

 I prefer external sites to open in a new window/tab, I almost expect
 them to.



 Rick Faircloth wrote:
  Now why would target=_blank be deprecated without a suitable HTML
  substitute, requiring coders to have to resort to js for the functionality?

  Odd...

  Rick

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
  Behalf Of Liam Potter
  Sent: Tuesday, September 22, 2009 10:20 AM
  To: jquery-en@googlegroups.com
  Subject: [jQuery] Re: [Attrib external not working...]

  Except that target=_blank is deprecated in xhtml 1.1, so to make sure
  you're markup validates, you need to use javascript to make links open
  in a new window/tab.

  One way to do it is like this.

  $(a[rel='external']).click(function(){
              this.target = _blank;
          });

  Liam Byrne wrote:

  Maybe because 'rel=external' doesn't have any meaning or
  functionality ?

  The proper syntax with functionality would be a target=_blank
  href=http://www.google.com;google/a but that's just HTML; it has
  nothing to do with jQuery

  Liam

  Lord Gustavo Miguel Angel wrote:

  Hi,

  Why this code not working?

  a rel=external href=www.google.comgoogle/a

  urlwww.google.comhttp://www.google.com open in same windows.

  Thank´s
  

  No virus found in this incoming message.
  Checked by AVG -www.avg.comVersion: 8.5.409 / Virus Database:
  270.13.112/2388 - Release Date: 09/22/09 05:51:00


[jQuery] Re: [Attrib external not working...]

2009-09-20 Thread Steven Yang
trya href=http://www.google.com;google/a

On Sun, Sep 20, 2009 at 7:25 PM, Lord Gustavo Miguel Angel 
goosfanc...@gmail.com wrote:

  Hi,

 Why this code not working?

 a rel=external href=www.google.comgoogle/a

 url www.google.com open in same windows.


 Thank´s



[jQuery] Re: [Attrib external not working...]

2009-09-20 Thread Sergios Singeridis
add this and it will work.
if you want it to work it needs the following js code.

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName(a);
 for (var i=0; ianchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute(href) 
   anchor.getAttribute(rel) == external)
 anchor.target = _blank;
 }
}
window.onload = externalLinks;


2009/9/20 Lord Gustavo Miguel Angel goosfanc...@gmail.com

  Hi,

 Why this code not working?

 a rel=external href=www.google.comgoogle/a

 url www.google.com open in same windows.


 Thank´s




-- 
Regards,
Sergios Singeridis