I'm using atahualpa theme in my site version 3.6.7 and I want to use javascript tinysort (more info here) . This script sorts the posts as you want using tags or from html classes.
I have add the script link in the header, the script the way I want to be my posts sorted and the links to activate it at the sidebar, as below , but it seems that nothing works.
Header
HTML Code:
<script type="text/javascript" src="http://pickadeal.gr/wp-content/themes/atahualpa/js/jquery.tinysort.min.js"> <script type="text/javascript"> $("div.post").tsort({attr:"imported",order:"desc"}); $("a#sortprice").click(function(){ $("div.post").tsort({attr:"price",order:"asc"}); }); $("a#discount").click(function(){ $("div.post").tsort({attr:"discount",order:"desc"}); }); </script>
HTML Code:
<a href="#" id="sortprice">Cheapest first</a> <a href="#" id="discount">Biggest discount first</a>
Is there any problem using javascript with atahualpa??
Can anyone please help me??