...version 3.5.4 was never published https://github.com/select2/select2/issues/5360 import 'select2/select2.js' import 'select2/select2.css' import 'select2/select2-bootstrap' import 'jquery-ujs' window.$ = jQuery window.jQuery = jQuery // JavaScript let webpackContext = require.context('../javascripts', true, /\.js$/)
...for assets and the Asset Pipeline itself, e.g. sass-rails, uglifier, autoprefixer-rails, sprockets-rails, jquery-rails, bootstrap-sass and many more. Remove Asset Pipeline configurations from app/config/application.rb and app/config/environments...
The attached compiler() function below applies JavaScript behavior to matching HTML elements as they enter the DOM. This works like...
Localizing a non-trivial application can be a huge undertaking. This card will give you an overview over the many...
...weird sorting is necessary, since the pipeline does some unfortunate prefix detection, and would detect jquery-ui/jqueryui.js to live in the jquery folder. Putting longer folders first fixes this...
...We organize stuff like this: # jquery goes here vendor/asset-libs/jquery/jquery.1.7.2.min.js # jquery-ui goes here vendor/asset-libs/jquery-ui/jquery-ui-1.8.21.custom.min.js vendor/asset-libs/jquery-ui/jquery-ui-1.8.21.custom.css vendor/asset-libs/jquery-ui/images/.... # icon set goes here vendor/asset-libs/fugue/icons/.... Your app/assets/javascripts/application.js: ... //= require jquery.1.7.2.min //= require jquery-ui-1.8.21.custom.min ... Your app/assets/stylesheets/application.css: ...
Recently I made an upgrade from Bootstrap 3 to Bootstrap 4 in a bigger project. Here are some tips how...
If you want to play music or sounds from a browser, your choice is to use either Flash or the...
Note This card does not reflect the current state of lazy loading technologies. The native lazy attribute could be used...
The asset pipeline changes the paths of CSS files during precompilation. This opens a world of pain when CSS files...
This guide shows how to create an AngularJS application that consumes more and more memory until, eventually, the browser process...
If you're using jQuery, you need to update to 1.5.1 to get Internet Explorer 9 to work.
...1rem "Open Sans"').then(() => {...
jQuery / fontSpy If your project uses jQuery, you could also use jQuery-FontSpy which also works in IE because it determines the font being loaded by...
}, failure: function() { alert('Font failed to load'); } }); You could also implement something like jQuery-FontSpy in vanilla JS or maybe use vanilla-fontSpy (we have not used it...
Capybara gives you two different methods for executing Javascript: page.evaluate_script("$('input').focus()") page.execute_script("$('input').focus()")
To upload a file via AJAX (e.g. from an ) you need to wrap your params in a FormData object.
Promises are the new way™ to express "Do this, and once you're done, do that". In contrast to callbacks...
You can use text-overflow to truncate a text using CSS but it does not fit fancy requirements.
This is a very general introduction to MV* Javascript frameworks. This card won't tell you anything new if you...
Current webkit browsers like Chrome and Safari have a special variable in their consoles that refers to the selected DOM...
For my Gem Session project Holly I ran the Ironman of drag'n'drop implementations: Dragging in nested lists
CSP hat zum Ziel einen Browser-seitigen Mechanismus zu schaffen um einige Angriffe auf Webseiten zu verhindern, hauptsächlich XSS...
Most of the JavaScript snippets have code that manipulates the DOM. For that reason dom manipulating javascript code should have...
Using the JS fullscreen API is painful because all browers use different methods and events and you need to use...
Accessing pseudo elements via JavaScript or jQuery is often painful/impossible. However, accessing their styles is fairly simple. Using getComputedStyle
Masonry is a famous library to dynamically arrange a grid of items that have different aspect ratio, like horizontal and...
If you come across an (older) application that is using Prototype instead of jQuery, you may often see events bound...