Thursday, February 28, 2013

jquery selectors ... more investigation

I still don't have a very good grasp on selectors in html, javascript and css.  I'm getting there though.  

With the updates in jquery, the library has also depreciated some of there functions (like one niffy one I discovered: live).  The live event allows functions to work even when parts of the page is loaded dynamically.  This is simple way of doing things (answering a lot of my issues) but it slow things down because it looks for the event in the entire document!

Wednesday, February 13, 2013

css learning -- more selectors!

How little I know... but now that can be changed! http://www.w3schools.com/cssref/css_selectors.asp

Tuesday, February 12, 2013

css learning - adjacent sibling selector

I was looking to do this " can-you-apply-a-css-hover-effect-to-an-element-thats-not-a-child-of-the-hovered ".  BUT I also wanted to do the reverse of this (ie, hover the 2nd element and something happens to first...)
I found it's not possible, as ordering is important.  So I used jquery :)

jquery 1.9 removes browser detection - answer modernizr

From my little bit of research.....

Javascript browser detection is not fail safe (since some websites/browsers can apply a different browser identity thus wrong styling).  Modernizr detects what css attributes the browser supports and (from your stylesheet) applies the most advanced attribute (like css3) and if the browser doesn't support that feature it will go to a fallback class.  
It seems pretty new since I'm still trying to figure how to detect ":nth-child".  But there are some resources with a bit of google searching.