Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7964163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:49:02+00:00 2026-06-04T05:49:02+00:00

I’m wondering how I can add the jQuery / Mobile Swipe event to my

  • 0

I’m wondering how I can add the jQuery / Mobile Swipe event to my WordPress Slide Show:

I’d like to be able to ‘Swipe’ through my slides with this using at Mobile.

Slide Show Code // Mark-Up with WP’s PHP:

<!-- Top of Page Slider FRAGILE -->

<div id="photo-rotatorWrapper">

<div id="photosubwrap" style="min-height: 280px; max-height: 280px;">

<div id="photo-rotator" style="">
<?php $slide_id=1; ?>
<?php
 $featuredPosts = new WP_Query();
 $featuredPosts->query("showposts=3");
 while ($featuredPosts->have_posts()) : $featuredPosts->the_post();
 ?>

    <div id="slide-<?php echo $slide_id; $slide_id++;?>">
     <a href="<?php the_permalink() ?>" class="post-image">
         <?php the_post_thumbnail( 'rotator-post-image' ); ?>
         <span class="title" style="font-style:italic; color:#999;"><?php the_title(); ?></span>
     </a>
     </div>

    <?php endwhile; ?><!--/close loop-->

    <ul id="slide-nav">
        <?php $nav_id=1; ?>
        <?php while ($featuredPosts->have_posts()) : $featuredPosts->the_post(); ?>
            <li>
                <a href="#slide-<?php echo $nav_id; ?>">
                    <span class="thumbnail" style="display:none;">
                    </span>
                    <p style="color:#F93; font-family:Georgia, 'Times New Roman', Times, serif; font-size: 18px;"><? the_title(); $nav_id++;?></p>

                    <div style="">

                    <!--<?php the_excerpt(); ?>-->

                    <?php if($text= get_post_meta($post->ID, "slidetext", true)) { ?>
                         <div class="">

                         <p style="font-weight: normal; color: #333; font-family: Arial, Helvetica, sans-serif; font-size: 14px;"><?php echo $text; ?></p> 

                         </div>
                        <?php } //else { print"<div>"; } ?>  

                    </div>   
                </a>
            </li>
        <?php endwhile; ?><!--/close loop-->
        </ul>
        </div>

</div>
</div>

<!-- End Top page Slider FRAGILE -->

Script allowing the Slide Show:

<script type="text/javascript">

jQuery(document).ready(function($){
    $("#photo-rotator").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 6000);
});

</script>

Update: I’ve just tried:

<script>
$("#slide-1").swiperight(function() {
    $.mobile.changePage("#slide-2");
});
</script>

With no such luck ~

ANY SUGGESTIONS – ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:49:04+00:00Added an answer on June 4, 2026 at 5:49 am

    To expand on my comment, here is how to programatically change a tab with jQuery UI’s tab widget:

    //cache all the tabs (I called them slides...)
    //get the number of tabs
    var $slides    = $('div[id^="slide"]')
        slideCount = $slides.length;
    
    //bind the event handlers necessary
    $slides.bind('swipeleft', function () {
        //this is to go to the next index
    
        //get current slide index and figure out the next one
        var currentIndex = $(this).index();
        if ((currentIndex + 1) < slideCount) {
            currentIndex++;
        } else {
            //the end was reached, so go back to the first tab
            currentIndex = 0;
        }
    
        //now select the new tab
        $("#photo-rotator").tabs( "select" , currentIndex);
    }).bind('swiperight', function () {
        //this is to go to the previous index
    
        //get current slide index and figure out the previous one
        var currentIndex = $(this).index();
        if ((currentIndex - 1) >= 0) {
            currentIndex--;
        } else {
            //the beginning was reached, so go to the last tab
            currentIndex = slideCount;
        }
    
        //now select the new tab
        $("#photo-rotator").tabs( "select" , currentIndex);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I want to show the soap response to UIWebview.. my soap response is, <p><img
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.