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.
Author » K K Agrawal
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.
Contact form 7 validation error don’t disappear
Contact form 7 gives the error message on submit but when we try to correct contact form 7 validation error don’t disappear. Usually, when someone tries to click back into the form field that has an error, the validation message disappears. The validation boxes stay in place and the user can’t see the form field to fix his error. I’ve had this work automatically on most of the sites.
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.
ga or _gaq in google analytics
ga and _gaq both are global object used for tracking in google analytics.
The _gaq global object can be used directly for asynchronous page tracking via the push(…) method.
How to concate column values in group rows in mysql
Sometime we face the problems for concatenating of group rows column value in a single string. Group_concat() is a function which help us to achieve this.
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.
JavaScript String substring() Method
substring() is one of the main string function which is mostly used in javascript. The substring() method extracts the characters from a string, between two specified indices, and returns the new sub string.
Difference between Attr and Prop in jQuery
Many developers confused with the Attr and Prop keyword in jQuery. So We are describing here the difference between Attr and Prop in jQuery. The segregation of attr() and prop() should help alleviate some of the confusion between HTML attributes and DOM properties.