I have a list of images I am trying to tap on, but the timing of the
taps are a bit awkward, especially since one swipes the list to see
the different ones.
The syntax of these is on multiple elements, each with a class instead
of an id.
The current 'working' version is here:
http://straathof.acadnet.ca/beta7.9
The jester javascript I have so far (which is not working... see
beta8.0 )is this:
var article_selection =$('#issue>a')[0];
var change_article = function(touches) {
alert("this is a click!");
//reset the dimensions of the page.
//updateOrientation();
//hide all articles in issue_content at beginning
$('#issue_contents>div').css('position','absolute').hide();
$(this).find('img').addClass('selected');
//show the article quickly
$
('#issue_contents>div').filter(this.hash).addClass('active').fadeIn(500);
//show the article content slowly
$
('#issue_contents>div').filter(this.hash).find('.article_content').fadeIn(500);
// $('#issue').addClass('hidden');
return false;
//updateOrientation();
};
The javascript which does work (but which is tied to touchstart) is:
$('#issue>a').bind('touchstart click', function() {
//change the state of the selected icon to
'selected' (indented)
$(this).find('img').addClass('selected');
//show the article quickly
$
('#issue_contents>div').filter(this.hash).addClass('active').fadeIn(500);
//show the article content slowly
$
('#issue_contents>div').filter(this.hash).find('.article_content').fadeIn(500);
// $('#issue').addClass('hidden');
return false;
//updateOrientation();
});
Any help would be great! I have several gestures in jester that would
be awesome to use for the different articles!