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.
Category » jQuery
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.
Prevent anchor in an iframe from scrolling the parent window
I was building a page in a website. In that page I was loading a page inside an iframe. The page inside iframe had an anchor (http:/fellowtuts.com/test.html#specific_content) as well. When I used to click on the anchors within the iframe to reach the specific content section, it was working in firefox browser smoothly but working with a undesired behaviour in chrome and internet explorer browsers. In chrome, it was scrolling the parent window to top along with Iframe’s content.
Event binding on dynamically created elements
Sometimes we load most of the page content using ajax dynamically. But this rendered html content generally does not bind with already defined events. But for making those events working, we need to rebind those events.
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.
Function Declaration vs Function Expression in JavaScript
There are different ways to define a function in javascript. I have seen these 2 ways to define and get confused with the differences than I googled and came across with some points which can help out to others to understand the difference between these.
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.
JavaScript String substr() Method
The substr() method returns the characters in a string beginning at the specified location through the specified number of characters. Syntax, parameters, examples of substr() in Javascript are as below.