Shims and Polyfills Note

<!–[if lt IE 9]>
<script src=”js/html5shim.js”></script>

This is a shim or a way to make html5 work for older browsers. Its more of a work around for browsers who does not support new html5 tags like <article> <section> <header> <footer> <aside> etc.

There are also shims out there that can be used like <canvas> shim, <svg> shim etc.

A polyfill is also a work around or a plugin for features not currently supported by the browsers or technology at hand. For example css3 transform property , or a javascript version not yet updated.

My JQUERY reference

var i = {one:1,two:3,three:[{four:8},2,3]} = Array format access by:, i.two, i.three[0].four returns 8, i.three[2] returns 3.

var i = [‘value’,’value2′,’value3′] = Another way to create array = To access a variable in an array

$.browser = Is an array that will loop through to find the browser you are using.It also contains the version.
$.support = Contains browser capability. To access it you go. $.support.[name], possible values are:
boxModel:if browser supports w3c box model.
cssFloat:if css float i used to acess css float value.
hrefNormalized: doesnt alter the results of getAttribute(‘href’). htmlSerialize: if properly serialize using inneHTML. leadingWhitespace: if browser preserves whitespace with innerHTML.
noCloneEvent: if does not clone handlers when cloned.
objectAll: if getElementByTagName returns all elements. opacity: If browser supports opacity styling.
scriptEval: if appenchild/createTextnode executes.
style: if getAttribute(‘style’) return the correct inline style.
tbody: if browsers allow table without tbody.

JQuery Selectors

$(‘#id’) = Selector of an element
$(‘p’) = Select all P tag in the page
$(‘p.class1’) = Select P with class1 as the class
$(‘div p.class1’) = Select p class1 inside div
$(‘p’).size() = return number of P in the page
$(‘p:first’) = Select the first occurence of P
$(‘p:last’) = Select the last occurence of P
$(‘p’)[0] = Select the first occurence of P but NOT Jquery element just normal DOM.
$(‘p > strong’) =Select <strong> with direct parent <p>
$(‘#div1 p:even’) = Select :even p elements inside #div
$(‘#div1 p:odd’) = Select :odd p elements inside #div
$(‘#div1 p:not(.class1)’) = Select all p but not p with class1
$(‘#div1 p:eq(0)’) = Select p first index
$(‘#div1 p:gt(5)’) = Select all p with index greater than 5
$(‘#div1 p:lt(5)’) = Select all p with index lower than 5
$(‘#div1 p:empty’) = Select all p with no children.
$(‘#div1 p:contains(text)’)= Select all p that contains specified text.
$(‘#div1 p:has(strong)’) = Select all p that has strong tag.
$(‘#div1 p:visible’) = Select all p that are visible.
$(‘#div1 p:hidden’) = Select all p that are hidden.
$(‘#div1 p:[style]’) = Select all p with style property
$(‘#div1 p:[border=1]’) = Select all p with border=1 property
$(‘#div1 p:first-child’) = Select all p that are first child of parent #div1
$(‘#div1 p:last-child’) = Select all p that are last child of parent #div1
$(‘#div1 :input’) = Select all input inside #div1.
$(‘#div1 :text’) = Select all input text inside #div1.
$(‘#div1 :radio’) = Select all input radio inside #div1.
$(‘#div1 :checkbox’) = Select all input checkbox inside #div1.
$(‘#div1 :enabled’) = Select all elements that are enabled inside #div1.
$(‘#div1 :disabled’) = Select all elements that are disabled inside #div1.
$(‘#div1 :checked’) = Select all elements that are checked inside #div1.
$(‘#div1 :selected’) = Select all elements that are selected inside #div1.
$(‘#div1 p:nth-child(3)’) = Select the 3rd p inside #div1.

Continue reading My JQUERY reference

Is your Exit Isolation mode missing in 3ds Max?

All you got to do is run this macro:
“(iso2roll.c2iso.changed (iso2roll.c2iso.state = false))” then you can drag and drop it in your toolbar, but sometimes when you do this macro, weirdly enough your Exit Isolation Mode goes back in view. Forgetting this whole shebangs. but either way you have your Exit Isolation Mode or Exit Isolation in toolbar handy for you next time! =)

2017 © Ideas, designs and algorithms