Skip to main content

Posts

Showing posts with the label Jquery

Refresh the Jquery Css for a HTML control using knockout in Javascript.

If you are a JavaScript developer then you might have come across a situation where you load your HTML controls after the page load has happen, which is like dynamic binding of controls. And then you see your input type text doesn't have the proper Css as other inputs. You also load select (dropdown)  that also doesn't have the proper css. You are in chrome and press F-12 to inspect the element, y ou see that nothing is there in control, it is not applying the JQuery css. But the controls that are loaded in page load have it. What to do, no options just to manually copy the CSS classes. VERY BAD IDEA? Just do this, In HTML < input type ="date" data-bind ="i nputsRefresh: $element, value: $data.EndDate " /> and in JS binding handler

Grunt - A command line JavaScript task runner.

Grunt is a JavaScript task runner that will help you to mini-fy the various JS files. It will make your work really less while performing repetitive tasks like minification, compilation, unit testing, linting, etc with just few lines of code you need to write in command prompt. Grunt is a task-based command line build tool for JavaScript projects. If you have a Javascript and html based project that used MVVM model and you have millions of lines of code to minimize then grunt is the key for you. Some of the p lugins Grunt can enjoy. Some of the big IT companies that uses grunt.. and Below is the starter guide provided by grunt official website to keep you jump started. have fun in grunting.  Getting started: Grunt and Grunt plugins are installed and managed via  npm , the  Node.js  package manager. Grunt 0.4.x requires Node.js version  >= 0.8.0 . Installing the CLI In order to get started, you'll want to in...