Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript update code for touchStart event

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #45094
    simmi
    Participant

    i have following code which is working fine per onClick evevnt of image, how can i update code to call method for touchStart event?

    this.defaults =
    {
    animationSpeed: 50, /* Animation speed in ms */
    aspectRatio: 1.964, /* Aspect ratio of the ImageFlow container (width divided by height) */
    buttons: false, /* Toggle navigation buttons */
    captions: false, /* Toggle captions */
    circular: true, /* Toggle circular rotation */
    imageCursor: ‘default’, /* Cursor type for all images – default is ‘default’ */
    ImageFlowID: ‘imageflow’, /* Default id of the ImageFlow container */
    imageFocusM: 1.0, /* Multiplicator for the focussed image size in percent */
    imageFocusMax: 3, /* Max number of images on each side of the focussed one */
    imagePath: ”, /* Path to the images relative to the reflect_.php script */
    imageScaling: true, /* Toggle image scaling */
    imagesHeight: 0.67, /* Height of the images div container in percent */
    imagesM: 1.0, /* Multiplicator for all images in percent */
    onClick: function() { /*document.location = this.url;*/ flipIt(this) }, /* Onclick behaviour */

    #137155
    simmi
    Participant

    i tried ,


    onClick, onTouch: function() { /*document.location = this.url;/

    but images are not displayed on screen .. seems it doesn’t allow to define 2 events

    #137574
    simmi
    Participant

    ‘O ‘ was capital so it was not working :P,,thnks … but for following onclick what should i do?

    switch ( image.i == my.imageID )
    {
    case false:
    image.onclick = function() {

    $(“#front”).html(imgFront[n]);
    my.glideTo(this.i);
    };

    break;

    default:
    this.zIndex = my.zIndex + 1;

    if(image.url !== ”)
    {
    image.onclick = my.onClick;
    }
    break;
    }
    image.style.zIndex = my.zIndex;
    }
    }

    #137582
    simmi
    Participant

    i mean instead of image.onclick what should i write ??? image.ontouch ??

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.