When We build a web application, we do not want the users to use the right button of the mouse.Today, many of the code examples used to disable the right-click no longer work in most browsers and browsers such as Opera do not allow the right-mouse button to be disabled. Anyway we can disable right click using jQuery or JavaScript.
Tag » JavaScript
Detecting mobile devices using jquery or javascript
Now a days, mobile is a common device in everyone’s hand. Internet is also used very much using these devices. So for web world, It is a challenge to be compatible their websites with these devices. For that, every application should be detect mobile device. Every language has its own method to detect the mobile device but we are explaining here the way of detecting mobile devices using jQuery or JAVASCRIPT.
How to speed up page rendering
In website, speed up page rendering is very important factor. Because if our page speed is fast then visitors can visit more pages on our site and can take a glance easily. We have to make our web pages fast but it’s not too easy to optimize web pages at each and every scale.
Prevent popup window from getting close by escape key
By default an opened modal popup window gets close whenever an user presses ESC key on keyboard. In some cases we need to prevent popup window from getting close by escape key as a part of our requirements. Here I have written two methods to disable the function of ESC key using JavaScript and jQuery each.
getting timestamp in JavaScript
I am describing here getting timestamp in JavaScript. In development,so many times we do the date and time manipulation and If we need to do it client side means we need to use JavaScript.
Including a JavaScript file in another JavaScript file
Here I will describe the way of including a JavaScript file in another JavaScript file. Because sometimes we need dynamic loading of JavaScript, may be based on some condition. In Css, We have already @import to include one css file into another.
How to check if something is hidden in jQuery
In jQuery and css, We hide and show the visibility of the element.We can use the functions .hide(), .show() or .toggle() or we can do it using css function also. How would we test if an element is visible or hidden using jQuery?
Open google map marker info window
In google map, we point the specific location based on it’s longitude and latitude and create a marker on that point. But If we want to show some information about that point, then we need to attach an info window with that marker which can be associated with marker’s hover or click event.
How to detect the screen resolution with javascript
In javascript, the screen.width and screen.height properties contain the size of a visitor’s monitor is set to. Bear in mind that the size of the monitor is set to, is not the same as the size of the browser window a visitor is using as windows can of course be set to different sizes. To get screen resolution with javascript we need to get the height and width of the viewport which depends on browser.
Top Fixed Menu Bar on Scroll with CSS & jQuery – Less Code
Here I am writing minimum code to make Top Fixed Menu Bar on Scroll with CSS & jQuery. The purpose of this article is to have the navigation menu fixed at top when visitors scroll down the page and place menu back to it’s original position when scrolling back to upside.