Category Archives: Jquery example

How to detect browser tab is active JavaScript

Tabbed browsing 

Most of the browser support Tabbed browsing so modern browsers have provided a way to detect if tab has focus or switched, HTML 5 provides Page Visibility API
to do this.

Simple script to deal with most of the modern browser like Firefox, Google chrome etc.

var vis = (function(){
var stateKey, eventKey, keys = {
hidden: "visibilitychange",
webkitHidden: "webkitvisibilitychange",
mozHidden: "mozvisibilitychange",
msHidden: "msvisibilitychange"
for (stateKey in keys) {
if (stateKey in document) {
eventKey = keys[stateKey];
return function(c) {
if (c) document.addEventListener(eventKey, c);
return !document[stateKey];

how to call the function

 document.title = vis() ? 'Active' : 'Not Active';

You can check the title to verify that given script is working or not. The title of the page changes accordingly.

Tab browsing

Tab browsing

Tab browsing


You can use this to to stop video when user looses the focus. You can also use this script to calculate the number second that user spend in your website.

PHP jobs in noida

PHP jobs in noida

Company : Mind Your Fleet (

Location : A-21, 2nd Floor, Sector 65, Noida

PHP Jobs in Noida



Mind Your Fleet provides a SaaS-based, end-to-end enterprise tool which helps car rental companies to promote, manage and distribute their business online. Our state-of-the-art technology ensure that you never miss out on customers who prefer booking online. With exclusive features such as native booker-supplier-traveler apps, automated booking & dispatch scheduler, robust accounting and god’s-eye-view technology, we help you cater to every single aspect of your business through one single platform.

As part of a new and fast growing team of top notch engineers, you will experience all the excitement and dynamism of a startup along with the scale and technology of a world class enterprise.

Other Products: &

Job Description:

We are looking for a PHP developer who is dedicated to his craft, writes code that is proud of and can hit the ground running. We need you to write well designed(clean), fast PHP to a high standard, in a timely and scalable way that improves the code-base of our products in meaningful ways.

You will be a part of a creative team that is responsible for all aspects of the ongoing software development from the initial specification, through to developing, testing and launching.


PHP jobs in delhi for freshers, PHP Fresher job, PHP EXperience jobs

Produce detailed specifications
Troubleshoot, test and maintain the core product software and databases to ensure strong optimization and functionality
Contribute in all phases of the development life-cycle
Follow industry best practices
Develop and deploy new features to facilitate related procedures and tools if necessary

PHP jobs in delhi for freshers


Proven software development experience in PHP
Framework – Any
Good To Have – MVC, Angular JS
Demonstrable knowledge of web technologies including MySQL, JavaScript, Jquery etc
Good knowledge of relational databases, version control tools and of developing web services
Experience in common third-party APIs (Google, Facebook, Ebay etc)
Passion for best design and coding practices and a desire to develop new bold ideas.

Kindly confirm your availability.

Email :


how to open window in javascript onclick

The method in JavaScript

The method is used to open new browser window see the syntax below:-


Note: All the parameter are optional.


<!DOCTYPE html>

<p>Click the open new window button to see the result</p>

<button onclick="openWindow()">Open new window</button>

function openWindow() {"");


This is the simple example of browser window in JavaScript. In this script openWindow() function opens new window with You can easily customize the window using other optional parameter like target, height, width.

Another Example with more params

<!DOCTYPE html>

<p>Click the open new window button to see the result</p>

<button onclick="openWindow()">Open new window</button>

function openWindow() {"","", "width=400,height=400");


In the above example we have specified the height and width with the method, see the try it yourself button to see the result.