Tuesday, April 5, 2011

My first BLog

this is my first bLog.
and I am going to write something on more of Logging my present works.

I am writing a UI element to show editable select element.
for same found some interesting properties of javascript and jquesry mostly related to
css properties

  • zindex: defined layered elements on a page. all elelments on a page are displayed in order of zindex
    • element.style.zindex
    • it seems this doesnt work in iE with select elements :(
    • for same, some tricks using iframe insteed to overlap the select elementt works just fine, though its a dirtysolution.
  • position of an element on a webpage: using jquery:
    • element.offset(); even with a particlar element like pos =  $('#folderList :selected').offset()
    • use it to position a overlapping element as $('#editableFolderName').css(pos);
  • double  clicking an element is captured on a element as ondblclick
  • focus
    • to get on a element use element.focus()
    •  loses an element it calls onblur
  • events
    • window.event or event defines the event generated
  • select element 
    • to add a option, use document.getElementById("myselect").add(new Option( txt, val ),undefined)
  • converting javascript object into json object
    • JSON.stringify(obj)

JQuery things


Welcoming the awesome tricks of jquery


  • adding option to a select list
    • $('#List').append(new Option(txt, val )
  • toggling display( only if element is made invisible using display:none;)
    • elem.toggle();

Monday, April 4, 2011

Git the ultimate tool

wow... I am learning to use git.
here is my very-short tool help for self

  • git add adds files to staging
  • git reset removes files from staging