Bootstrap – Uncaught TypeError: Cannot read property ‘fn’ of undefined

You need to load jquery first before bootstrap. require.config({ paths: { jquery: ‘libs/jquery/jquery’, underscore: ‘libs/underscore/underscore’, backbone: ‘libs/backbone/backbone’, bootstrap: ‘libs/bootstrap’, jquerytablesorter: ‘libs/tablesorter/jquery.tablesorter’, tablesorter: ‘libs/tablesorter/tables’, ajaxupload: ‘libs/ajax-upload’, templates: ‘../templates’ }, shim: { ‘backbone’: { deps: [‘underscore’, ‘jquery’], exports: ‘Backbone’ }, ‘jquery’: { exports: ‘$’ }, ‘bootstrap’: { deps: [‘jquery’], exports: ‘$’ }, ‘jquerytablesorter’: { deps: [‘jquery’], exports: … Read more

Requirejs why and when to use shim config

A primary use of shim is with libraries that don’t support AMD, but you need to manage their dependencies. For example, in the Backbone and Underscore example above: you know that Backbone requires Underscore, so suppose you wrote your code like this: require([‘underscore’, ‘backbone’] , function( Underscore, Backbone ) { // do something with Backbone … Read more

What is a Shim?

Simple Explanation via Cartoon An example of a shim: Summary A shim is some code that takes care of what’s asked (by ‘interception’), without anyone being any wiser about it. Example of a Shim An example of a shim would be rbenv (a neat ruby tool). Calls to ruby commands are “shimmed”. i.e. when you … Read more

What is the difference between a shim and a polyfill?

A shim is any piece of code that performs interception of an API call and provides a layer of abstraction. It isn’t necessarily restricted to a web application or HTML5/CSS3. A polyfill is a type of shim that retrofits legacy browsers with modern HTML5/CSS3 features usually using Javascript or Flash. Answering your specific question, call … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)