So I have been using Isotope for sometime on my website - I was recently asked why I had stopped using Isotope at which point I discovered that it had stopped working when I changed my theme.
Using jQuery instead of $ for javascript
The basic script for isotope is …
1
2
3
4
5
6
7
8
9
10
11
| <script type="text/javascript">
$(function(){
var $container = $('#container');
$container.isotope({
itemSelector: '.box'
});
});
</script>
|
However, WordPress reserves the use of $ so you need to change your script to
1
2
3
4
5
6
7
8
9
10
| <script type="text/javascript">
jQuery(document).ready(function() {
var mycontainer = jQuery('#isocontent');
mycontainer.isotope({
itemSelector: '.box'
});
});
</script>
|
Tags:
Isotope lite,
jQuery,
masonryMeet the author

Damien Saunders
An experienced management consultant and business leader interested in digital transformation, product centred design and scaled agile. If I'm not writing about living with UCTD (an autoimmune disease), I'm probably listening to music, reading a book or learning more about wine.