I keep getting this error on firebug -> TypeError: window.open is not a function
code:
    $(document).ready(function()
{
    $('.div').click(function()
    {
        var link = $(this).data('link');
        window.open(link);
    });
});
Isn't that function supposed to work?
late but for all other coders! if you have a global variable named "open" like "open = true;" or "var open = true" or something like that, then the function "open()" would not work anymore.
Although it's not entirely clear from your question, the value of window.open is not read-only and can therefore be changed by other code, such as:
window.open = false;
// ...
window.open('something') // error: window.open is not a function
If you know what scripts are loaded on your page, this shouldn't be hard to do, just search for anything relating to window.open.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With