jquery - Open links in new window -


i have jquery script opens link in new window:

$(document).on('click', 'a.externalurl', function () {         window.open(this.href);     }); 

and in template got snippet of code:

{{#facebook}}   <a href="{{facebook}}" target="_blank">facebook</a> {{/facebook}} 

the problem is, it's opening localhost in url, in stead of going directly facebook.com.

example:

http://localhost:57391/www.facebook.com 

use "http://{{facebook}}" or "https://{{facebook}}" href attribute


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -