Just a quick post with a few notes on Assetic. These are mainly on topics people have been searching for when they have visited this blog. Loading Filters If you are using Assetic from Symfony2 then its worth being aware that it does not automatically load up all the available filters. Only the filters you [...]
Posts Tagged ‘javascript’
Symfony2: Using CoffeeScript with Assetic
CoffeeScript is a scripting language which is compiled to run as JavaScript. It let you write simpler code with improvements in much of the JavaScript syntax, mainly inspired by Ruby and Python. It is served up to the end user as JavaScript so it requires nothing on the end users part. If you are using [...]
Symfony2: Using Assetic from Twig
After my earlier post digging in to how Assetic (Symfony2‘s asset manager) works, I am now going to look at how you should actually use it from Symfony2′s templating engine Twig. Kris Wallsmith the developer of Assetic pointed me in the right direction in the comments on that post. He has now added some official [...]
Symfony2: Using Assetic for CSS and JavaScript Management
Edit: Please read the first the first comment from Kris Wallsmith, this explains that you do not need to write any PHP at all to make use of Assetic, it can be configured directly from Twig templates. My follow up post Symfony2: Using Assetic from Twig has more on this. Nevertheless the following should give [...]
jQuery: IE8 bug when adding a Form
Quick version I found a bug in IE8 when adding a form to the DOM using jQuery, fortunately there is a simple solution, unfortunately it took a while to stumble upon it. Background Whilst implementing a new in-page contact form for limethinking.co.uk I ran into a bug with Internet Explorer 8. Unexpectedly though it worked [...]
jQuery: Manipulating an Ajax response before inserting it into the DOM
Quick gotcha – well it got me anyway. I was manipulating an HTML response from an Ajax request with jQuery before inserting it into the DOM but my changes were not making it into the DOM. My code looked something like this simplified example: $.get(’/some-url/’, function(data) { $(data).find(’#someDiv’).append(’<p>Some Text</p>’); $(’body’).append($(data)); }); The problem is is [...]
Internet Explorer Conditional Comments and JavaScript
As we prepare for the launch of the new Lime Thinking website, I have been looking at the front end. One issue we have found is getting some of the JavaScript enhancements working in the older versions of Internet Explorer. Whilst we are using jQuery which deals with most of these browser variations very effectively [...]


