Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

Tuesday, November 22, 2016

JavaScript - Why to use "var that = this;"

Now a days most of JavaScript files are following Object Oriented Approach.

In simple words, it means it is possible to call super methods using child classes.
So not to lose a reference of function which is calling other one, that is smartly getting used.

Below are good examples explaining about that to refer this:



Keep sharing….!

III
Best Regards,
Abhijeet Rathod.
------------------------------
When 'I' is replaced by 'We',
Even illness becomes wellness.
------------------------------

Sunday, March 17, 2013

Using style.display instead of style.visibility

Hello,

HTML-CSS-JavaScript combination is little bit tricky to non-web developers.

There are few UIs which seems to be inconsistent as we are using JavaScript to enable/disable the HTML Components.
And it takes time to find out and align all the forms.
If you are using any JavaScript and CSS combination to hide/show any components, below information may save your time. 


To maintain proper alignment of whole HTML and its elements, please use following:
Element Property
Value
style.display
'none' (To hide element)
style.display
'' (Empty string to show element)


Please try to avoid using style.display='block' and style.visibility='hidden'/'visible'/'inline' as it is affecting the CSS applied.

---
Cheers and Enjoy Scripting!
-------------------------------------------------------------------------
Alphabet 'O' stands for Opportunity,
Which is absent in 'Yesterday', Is available once in 'Today'
And thrice in 'Tomorrow' So don't think about 'Yesterday'.
-------------------------------------------------------------------------