List.js - Add search, sort and flexibility to plain HTML lists with cross-browser native JavaScript by @javve
4 weeks ago by Aetles
Do you want a 3 KB cross-browser native JavaScript that makes your plain HTML lists super flexible, searchable, sortable and filterable? Yeah!
Do you also want the possibility to add, edit and remove items by dead simple templating? Hell yeah!
html
javascript
js
lists
Do you also want the possibility to add, edit and remove items by dead simple templating? Hell yeah!
4 weeks ago by Aetles
How to adjust an iframe element’s height to fit its content | 456 Berea Street
february 2012 by Aetles
In an ideal world there would always be a clean way of displaying data supplied by a third party on your site. Two examples would be getting the data in JSON or XML format from a Web Service and having an API to code against. But you don’t always have any of those options.
Sometimes the only way of incorporating data from a third party is by loading it in an iframe element. A few examples are financial reports, e-commerce applications, and ticket booking applications. Using an iframe is not ideal for many reasons, one of which is that it can make multiple sets of scrollbars appear on the page. Not only does it look ugly, it also makes the site less user-friendly. But there is a workaround.
Adjust the iframe’s height with JavaScript
By using the following piece of JavaScript you can adjust the height of the iframe element to match the height of its content:
code
css
iframe
javascript
js
Sometimes the only way of incorporating data from a third party is by loading it in an iframe element. A few examples are financial reports, e-commerce applications, and ticket booking applications. Using an iframe is not ideal for many reasons, one of which is that it can make multiple sets of scrollbars appear on the page. Not only does it look ugly, it also makes the site less user-friendly. But there is a workaround.
Adjust the iframe’s height with JavaScript
By using the following piece of JavaScript you can adjust the height of the iframe element to match the height of its content:
february 2012 by Aetles
javascript - ENTER key on a FORM with a single Input Field, will automatically SUBMIT with GET - Stack Overflow
january 2012 by Aetles
Why is it that a form with a single input field will reload the form when the user enters a value and presses the Enter key, and it does not if there are 2 or more fields in the form. I wrote a simple page to test this oddity.
If you enter a value in the second form and press Enter, you'll see it reloads the page passing the entered value as if you called GET. why? and how do I avoid it?
browser
javascript
js
forms
If you enter a value in the second form and press Enter, you'll see it reloads the page passing the entered value as if you called GET. why? and how do I avoid it?
january 2012 by Aetles
into time .org by rafaël rozendaal, 2011
november 2011 by Aetles
En sida som saknar innehåll men skiftar i färgtoningar på ett behagligt sätt.
js
javascript
colors
november 2011 by Aetles
yepnope.js | A Conditional Loader For Your Polyfills!
march 2011 by Aetles
yepnope is an asynchronous conditional resource loader that's super-fast, and allows you to load only the scripts that your users need.
javascript
js
library
march 2011 by Aetles
Drupal 7: Taking control of CSS and JS aggregation | Metal Toad Media
january 2011 by Aetles
Drupal 7 includes a big re-factor of the way CSS and Javascript are aggregated. What does this mean for your sites? In short:
You will see a greater number of files compared to D6 - this is normal and not usually cause for alarm. Surprisingly, more files is sometimes better.
To ensure efficient aggregation, the most important thing developers can do is choose the parameters to drupal_add_css and drupal_add_js carefully. And if you encounter contrib modules that are using the wrong parameters, please file patches!
This was a somewhat controversial change, and understanding the new strategy (and how to override it) requires going a bit deeper.
Previously, all files were merged together into one giant file (at least within the same scope or media type). This strategy worked well on simple sites with few or no contrib modules. Unfortunately, many contrib modules in D6 incorrectly add conditional* CSS and Javascript files – resulting in changing aggregates as you browse from page to page. If even a few lines af code differ, the entire aggregate (including large libraries like jQuery and jQuery UI) must be re-downloaded, consuming extra bandwidth.
drupal
css
js
You will see a greater number of files compared to D6 - this is normal and not usually cause for alarm. Surprisingly, more files is sometimes better.
To ensure efficient aggregation, the most important thing developers can do is choose the parameters to drupal_add_css and drupal_add_js carefully. And if you encounter contrib modules that are using the wrong parameters, please file patches!
This was a somewhat controversial change, and understanding the new strategy (and how to override it) requires going a bit deeper.
Previously, all files were merged together into one giant file (at least within the same scope or media type). This strategy worked well on simple sites with few or no contrib modules. Unfortunately, many contrib modules in D6 incorrectly add conditional* CSS and Javascript files – resulting in changing aggregates as you browse from page to page. If even a few lines af code differ, the entire aggregate (including large libraries like jQuery and jQuery UI) must be re-downloaded, consuming extra bandwidth.
january 2011 by Aetles
Copy this bookmark: