Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

New tab instead of new window question.

Aloittaja MJNS1981, heinäkuu 10, 2013, 02:47:16 IP

« edellinen - seuraava »

MJNS1981

So I did some searches but I cant seem to find an answer to what Im looking for.
I am totally new to all this stuff so Im basically clueless with everything (but Im learning... kind of). So please excuse my ignorance.

Im opening a little forum, and I used Firox Multicolor as a theme.  Ive been doing a little bit of tweaking, and Im at the last little thing I want to do before I consider the forum ready.

In the theme Im using there are social networking buttons for sharing your forum.  I wanted to change it so that they linked to my various profiles instead, which Ive done... but Ive hit a wall.  When you click on the buttons, they open up in new windows, and I want them to open in new tabs.

This is the original bit of code I was messing with:

Lainaa// bind click
                    $('.pop').click(function(){
                        window.open [nofollow]($(this).attr('href'),'t','toolbar=0,resizable=1,status=0,width=640,height=528');
                        return false;
                    });


I just messed with it to make the windows open up as "complete" windows (full sized with the tool bar and such).
This is what it looks like now.

Lainaa// bind click
                    $('.pop').click(function(){
                        window.open [nofollow]($(this).attr('href'),'t','toolbar=1,resizable=1,status=0,');
                        return false;
                    });

I have a feeling Im basically just butchering code to force it to do what I want haha... but what would I do to make it so clicking the buttons opens a tab instead of a popup window?

Thanks!

Neo_TE

Try this.

// bind click
                    $('.pop').click(function(){
                        window.open($(this).attr('href').attr('target','_blank'),'t','toolbar=0,resizable=1,status=0,width=640,height=528');
                        return false;
                    });

MJNS1981

That just makes it open in the current tab.

IchBin™

IchBin™        TinyPortal

Advertisement: