This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to make string uppercase | |
"hello".toUpperCase(); // "HELLO" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("Hello from Webpack"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require("path"); | |
module.exports = { | |
entry: "./src/index.js", | |
output: { | |
filename: "bundle.js", | |
path: path.resolve(__dirname, "dist") | |
}, | |
mode: "development" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SetCaretAtEnd(elem) { | |
var elemLen = elem.value.length; | |
// For IE Only | |
if (document.selection) { | |
// Set focus | |
elem.focus(); | |
// Use IE Ranges | |
var oSel = document.selection.createRange(); | |
// Reset position to 0 & then set at end | |
oSel.moveStart('character', -elemLen); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.selectRange = function (start, end) { | |
return this.each(function () { | |
if (this.setSelectionRange) { | |
this.focus(); | |
this.setSelectionRange(start, end); | |
} else if (this.createTextRange) { | |
var range = this.createTextRange(); | |
range.collapse(true); | |
range.moveEnd('character', end); | |
range.moveStart('character', start); |