Web development

Some useful links I try to save here to help me with web development and hopefully other developers out there!

Sunday, December 15, 2013

Check if your page is visible currently via javascript

Link here.
Posted by Nipurn at 3:17 AM No comments:
Email ThisBlogThis!Share to XShare to Facebook
Labels: active, js, session
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Contributors

Nipurn
View my complete profile

Internet Defense League

Member of The Internet Defense League

Quick tips

It's faster to use .length rather than .size() in jquery as .size() function return .length of the element itself.
Selectors
In css, browsers read the selectors from the right to left. And, as a rule, try to not to use selectors that are type selectors like li, p etc.
z-index will only work on an element whose position property has been explicitly set to absolute, fixed, or relative.
In a function declaration in javascript, the function stands on its own and does not need to be assigned to anything.
eg-
function multiple(a, b) { return a * b; } // Note, no semi colan is needed
IE Hack
When creating a good, solid markup, at times when IE does not seem to play nicely, try applying the css property { zoom : 1; } and see if this fixes the issue. 90% of the times it fixes the display problems in IE. This css only works for IE.

Total Pageviews

Site Archive

  • ►  2015 (2)
    • ►  September (1)
    • ►  July (1)
  • ►  2014 (13)
    • ►  December (2)
    • ►  August (2)
    • ►  July (1)
    • ►  March (5)
    • ►  February (2)
    • ►  January (1)
  • ▼  2013 (80)
    • ▼  December (1)
      • Check if your page is visible currently via javasc...
    • ►  November (2)
    • ►  October (1)
    • ►  September (1)
    • ►  August (1)
    • ►  July (7)
    • ►  June (10)
    • ►  May (12)
    • ►  April (8)
    • ►  March (12)
    • ►  February (11)
    • ►  January (14)
  • ►  2012 (119)
    • ►  December (15)
    • ►  November (9)
    • ►  October (17)
    • ►  September (13)
    • ►  August (11)
    • ►  July (8)
    • ►  June (16)
    • ►  May (9)
    • ►  April (21)

Popular Posts

  • Make lasers using css
    Link here .
  • Charting library using d3.js framework
    Link here .
  • Saving and accessing javascript values in json even after a page refresh !
    Link here . Yes, now it's possible to access small json key-values in javascript even after a page is refreshed using Lawnchair api. ...
  • Border - box
    Link here Works ie8+ * { box-sizing: border-box } FTW One of my least favorite parts about layout with CSS is the relationship of width...
  • Tutorial to understand node.js step by step.
    Link here .
  • API to go fullscreen !
    Link  here . A simple api using jquery to make images, videos and other content go full screen when clicked on. The first line says its a...
  • Use java libraries with nodejs
    Link here .
  • Cool css webkit animations !
    Link here . Try them out on jsfiddle !
  • Online encrypt, split, merge a pdf .. And a lot more options..
    Link here .
  • A preprocessing language for css that works on javascript
    Link here .