hello.js

var please = require('share');
console.log('thank you');

NEW !!!

Sunday, 18 December, 2022 UTC

NextJS Quick start tutorial on Mac

Quick start tutorial steps for installing NextJS: Install Node on Mac Create NextJS projectnpx create-next-app@latest –javascript(We can name it proj1) Run the app in dev read more The post NextJS Quick start tutorial on Mac appeared first on InfoHeap. ... more


Monday, 17 October, 2016 UTC

jQuery – add text to existing div

jQuery .append() can be used to add text to an div. The text can contains tags inside it. The post jQuery – add text to existing div appeared first on InfoHeap. ... more


Sunday, 16 October, 2016 UTC

jQuery sliding effect – slideUp, slideDown, slideToggle

jQuery slideDown, slideUp, slideToggle can be used to display, hide or toggle and element in sliding motion. .slideDown( [duration ] [, complete_callback ] ) .slideDown( read more The post jQuery sliding effect – slideUp, slideDown, slideToggle appeared ... more


Tuesday, 11 October, 2016 UTC

Javascript – textarea and text input select all

Javascript object.select() can bse used to select full text in textarea and text put fields in HTML. Example – select all in textarea Example – read more The post Javascript – textarea and text input select all appeared first on InfoHeap. ... more


Sunday, 2 October, 2016 UTC

Javascript – declare and invoke anonymous function at the same time

Javascript can declare anonymous function and call it at the same time using the following syntax: (function (arg1, arg2, ...) { }) (arg1, arg2, ...); read more The post Javascript – declare and invoke anonymous function at the same time appeared first ... more


Tuesday, 13 September, 2016 UTC

jQuery – text input field change keyup and paste events

jQuery can be used to handle these events on an input text field. change (when text input field changes and loses focus) $('input#field1').on('change', function(evt) { read more The post jQuery – text input field change keyup and paste events appeared ... more


Sunday, 28 August, 2016 UTC

Javascript – check if string is number

The isNaN() function determines whether a value is NaN (Not-A-Number) or not. Note that parseInt approach may not work with strings having valid number prefix. read more The post Javascript – check if string is number appeared first on InfoHeap. ... more


Sunday, 28 August, 2016 UTC

jQuery ui slider and input text box – two way binding

jQuery ui can be used to create a slider with updated value getting displayed in an input text box and any update in text box read more The post jQuery ui slider and input text box – two way binding appeared first on InfoHeap. ... more


Sunday, 28 August, 2016 UTC

jQuery ui slider and input text box – one way binding

jQuery ui can be used to create a slider with updated value also getting displayed. Syntax: Example – slider and input text box – one read more The post jQuery ui slider and input text box – one way binding appeared first on InfoHeap. ... more


Monday, 15 August, 2016 UTC

AngularJS ng-if vs ng-hide/ng-show

Angular ng-if directive removes or recreates a portion of the DOM tree based on an expression (true or false). On the other hand ng-show (or read more The post AngularJS ng-if vs ng-hide/ng-show appeared first on InfoHeap. ... more


Wednesday, 3 August, 2016 UTC

AngularJS ng-href example

AngularJS directive ng-href can be used to use a template to create href. Directly using it in href can make the link broken before Angular read more The post AngularJS ng-href example appeared first on InfoHeap. ... more


Saturday, 30 July, 2016 UTC

AngularJS ng-hide – conditionally hide an element

AngularJS directive ng-hide hides an element if the expression ng-hide evaluates to true. Under the hood it adds or removes class ng-hide to the element. read more The post AngularJS ng-hide – conditionally hide an element appeared first on InfoHeap. ... more


Saturday, 30 July, 2016 UTC

AngularJS ng-disabled – conditionally disable an element

AngularJS directive ng-disabled sets the disabled attribute on the element if the expression ng-disabled evaluates to true. The post AngularJS ng-disabled – conditionally disable an element appeared first on InfoHeap. ... more


Sunday, 24 July, 2016 UTC

AngularJS ng-dblclick examples

Example1 AngularJS ng-gblclick example to increment a variable on every double click. Example2 AngularJS ng-dblclick example to increment a variable on every double click. This read more The post AngularJS ng-dblclick examples appeared first on InfoHeap. ... more


Sunday, 24 July, 2016 UTC

AngularJS ng-click examples

Example1 AngularJS ng-click example to increment a variable on every click. Example2 AngularJS ng-click example to increment a variable on every click. This time use read more The post AngularJS ng-click examples appeared first on InfoHeap. ... more


Tuesday, 19 April, 2016 UTC

Javascript – append item to array

Javascript code to append one or multiple values at the end of array Append one value Append multiple values The post Javascript – append item to array appeared first on InfoHeap. ... more


Monday, 18 April, 2016 UTC

Test site css, javascript, html in old IEs

We frequently need to test css, javascript and HTML in old IE (internet explorer) browsers on Windows. This can be done using IE11 developer tools read more The post Test site css, javascript, html in old IEs appeared first on InfoHeap. ... more


Sunday, 17 April, 2016 UTC

Make an element draggable using Vanilla Javascript

Javascript event handler mousedown and mousemove can be used to make an element draggable without using any other library. This can be made to work read more The post Make an element draggable using Vanilla Javascript appeared first on InfoHeap. ... more


Friday, 15 April, 2016 UTC

AngularJS animattion using ng-class

Angular ngAnimate can be used to create animation effect using animation aware directives. Usage: Example – animate with ng-class This example uses ng-class to toggle read more The post AngularJS animattion using ng-class appeared first on InfoHeap. ... more


Thursday, 14 April, 2016 UTC

AngularJS ng-if – conditional dom tree

Angular ng-if directive removes or recreates a portion of the DOM tree based on an expression (true or false). Usage: Example – ng-if without animation read more The post AngularJS ng-if – conditional dom tree appeared first on InfoHeap. ... more


Thursday, 14 April, 2016 UTC

jQuery – how to get version info

to get jQuery version info the variable jQuery.fn.jquery (or $.fn.jquery if $ is being used for jQuery object) can be used. Some examples. jQuery version read more The post jQuery – how to get version info appeared first on InfoHeap. ... more


Thursday, 14 April, 2016 UTC

jQuery ui – make an element draggable

jQuery ui can be used to make an element draggable/movable by mouse drag. Note that it does not work with touch events. Syntax: // After read more The post jQuery ui – make an element draggable appeared first on InfoHeap. ... more


Wednesday, 13 April, 2016 UTC

Javascript convert array to json string

JSON.stringify() can be used to convert a given javascript value to json strng. Usage: JSON.stringify(value[, replacer[, space]]) Here are some examples Example – JSON.stringify() default read more The post Javascript convert array to json string appeared ... more


Wednesday, 13 April, 2016 UTC

AngularJS ng-init

The ng-init directive allows you to evaluate an expression in the current scope. This can be used to initialize model values. Usage: Example Initialize date read more The post AngularJS ng-init appeared first on InfoHeap. ... more


Wednesday, 13 April, 2016 UTC

AngularJS – dynamic css using ng-style

Angularjs ng-style directive can be used to define inline style attribute which can define dynamic style values using variables. Usage: Note that expression evals to read more The post AngularJS – dynamic css using ng-style appeared first on InfoHeap. ... more


Tuesday, 12 April, 2016 UTC

AngularJS – conditional css using ng-style

Angularjs ng-style directive can be used to define inline style attribute which can define a style values based on some condition. We’ll use checkbox state read more The post AngularJS – conditional css using ng-style appeared first on InfoHeap. ... more


Tuesday, 12 April, 2016 UTC

jQuery – find select element selectedIndex, value and text

jQuery code to access select element’s selected index, selected value and selected option node text. The post jQuery – find select element selectedIndex, value and text appeared first on InfoHeap. ... more


Tuesday, 12 April, 2016 UTC

jQuery – get checkbox value and checked state

jQuery can be used to access checkbox value using jQuery.attr(“value”) and it checked state using jQuery.prop("checked"). Note that we can not use jQuery.attr() for checked read more The post jQuery – get checkbox value and checked state appeared ... more


Tuesday, 12 April, 2016 UTC

HTML5 script async – how to load script asynchronously

HTML5 script async attribute can be used to load a script asynchronously. with async one can also use onload attribute to attach any javascript code read more The post HTML5 script async – how to load script asynchronously appeared first on InfoHeap. ... more


Tuesday, 12 April, 2016 UTC

jQuery – get javascript object

jQuery when applied on a css selector, returns a wrapper object which contains 0 or more javascript objects. To get the javascript object from it, read more The post jQuery – get javascript object appeared first on InfoHeap. ... more