How do check if a the user has the browser's tab/window currently on our page
function userisonourpage()
{
//do something
}
And when a user switches the tab/window to our page ?
function tabswitched()
{
//dom something here too
}
Just like in many places u switch to the page and the title changes i know the title can be changed with : document.title
but dont know how to implement those functions.
Thanks :D
var selectedTab = $("#TabList"). tabs(). data("selected. tabs");
Launch the Command Prompt or PowerShell and type the command "slmgr /xpr." Press Enter and you should see a prompt saying whether your Windows machine is activated or not. Click or tap OK, and you are done.
You could do this:
$(document).ready(function(){
$([window, document]).focusin(function(){
//Your logic when the page gets active
}).focusout(function(){
//Your logic when the page gets inactive
});
});
Hope this helps. Cheers
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