Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   [SOLVED] Problem using Javascript (http://forum.bytesforall.com/showthread.php?t=16061)

synteknos Nov 22, 2011 11:42 AM

[SOLVED] Problem using Javascript
 
Hello,

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>

Activation links
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??

juggledad Nov 22, 2011 01:32 PM

is it suppose to work with wordpress?
what are you trying to sort?

synteknos Nov 22, 2011 04:12 PM

I have seen other sites using it , I think that will work in wordpress.
I want to sort the post not only from the newest to the older like wordpress does but also with custom fields I use as parameters like price, discount, expiring day etc.

juggledad Nov 22, 2011 04:57 PM

You might want to ask this question over at wordpress.org. If you can get it to work using twenty-eleven and there is an issue with Atahualpa then we can look into it, but since there are no clear instructions on how to set it up, there isn't much I can offer you.

synteknos Nov 23, 2011 02:07 AM

Problem solved.
It workes with wordpress , but I had make a mistake at the activation links.
Thank you very much


All times are GMT -6. The time now is 04:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.