Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

[SOLVED] Problem using Javascript


  #1  
Old Nov 22, 2011, 12:42 PM
synteknos
 
3 posts · Nov 2011
Athens,Greece
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??
  #2  
Old Nov 22, 2011, 02:32 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
is it suppose to work with wordpress?
what are you trying to sort?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Nov 22, 2011, 05:12 PM
synteknos
 
3 posts · Nov 2011
Athens,Greece
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.
  #4  
Old Nov 22, 2011, 05:57 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Nov 23, 2011, 03:07 AM
synteknos
 
3 posts · Nov 2011
Athens,Greece
Problem solved.
It workes with wordpress , but I had make a mistake at the activation links.
Thank you very much

Bookmarks

Tags
atahualpa 3.6.7, javascript, sort posts



Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript Problem bvimusic Atahualpa 3 Wordpress theme 5 Sep 12, 2011 05:25 PM
Javascript Countdown bvimusic Atahualpa 3 Wordpress theme 1 Sep 12, 2011 03:37 PM
[SOLVED] problem with JavaScript in pages marek91 Center area post/pages 7 Nov 28, 2010 10:29 PM


All times are GMT -6. The time now is 11:25 PM.


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