open link in new tab with JS or Jquery

Asked

Viewed 2,185 times

0

I set up a website using Mobirize and it has a Facebook icon that when clicked you share the site on your face as a post. I would like it to open a new tab instead with a specific Facebook page.In this case what opens the popup is the code popupUrl: 'https://www.facebook.com/sharer/sharer.php?u={url}',

code:

var services = {
    facebook: {
        // https://developers.facebook.com/docs/reference/fql/link_stat/
        counterUrl: 'https://graph.facebook.com/fql?q=SELECT+total_count+FROM+link_stat+WHERE+url%3D%22{url}%22&callback=?',
        convertNumber: function(data) {
            return data.data[0].total_count;
        },
        popupUrl: 'https://www.facebook.com/sharer/sharer.php?u={url}',
        popupWidth: 600,
        popupHeight: 359
    },

1 answer

0

I found out, I had to update this code above for this:

var services = {
    facebook: {
        // https://developers.facebook.com/docs/reference/fql/link_stat/
        counterUrl: 'https://graph.facebook.com/fql?q=SELECT+total_count+FROM+link_stat+WHERE+url%3D%22{url}%22&callback=?',
        convertNumber: function(data) {
            return data.data[0].total_count;
        },
        window.open: 'https://www.facebook.com/dungeongamebar',
        popupWidth: 600,
        popupHeight: 359
    },

Browser other questions tagged

You are not signed in. Login or sign up in order to post.