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

  • SEARCH
  • Home
  • 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 9224749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:24:07+00:00 2026-06-18T04:24:07+00:00

Having read up on it and having been told off several times for using

  • 0

Having read up on it and having been “told off” several times for using live as opposed to on I am moving all my code over to on… and having loads of trouble!!

Most of it I have overcome, but today I have a very strange issue.

I have a question/answer bulletin board thing where the message headers are shown but content is loaded dynamically when clicking a header, the HTML is

<div class="headerRow" id="header_<%# Eval("headerId")%>">
    <span class="delete" id="delete_<%# Eval("msgId")%>"></span>
    <span class="markClosed" id="close_<%# Eval("headerId")%>"></span>

    <span id="view_<%# Eval("msgId")%>" class="openCurrent">                                       
        <span class="customerData userCol">
            <span class="qName"><%# Eval("customerName")%></span>
            <span class="qEmail">(<%# Eval("email")%>)</span>                           
        </span>    
        <span class="subjectCol"><%# Eval("subject")%></span>                             
        <span class="timeCol"><%# Eval("dateTime")%></span> 
    </span>

    <span class="reply" id="reply_<%# Eval("msgId")%>"> Reply </span>
</div>

So we have a headerRow container, within which are some buttons to close or delete the message thread, and then a span containing the details of the message, user name, email subject, and then a button to press to opena reply form.

The span with class openCurrent has a jQuery on binding as follows:

$('body').on('click', '.openCurrent', function (e) {
    var msgid = extractNumbers($(this).attr('id')); // sub function to pull the message ID from the element ID
    if ($('#content_' + msgid).html() == '') {
        $(but).addClass('centreLoader');
        getMsgContent(msgid, 'absolute', function (result) {
            // getMsgContent is an AJAX call returning the message
            $('#content_' + msgid).html(result).slideToggle();
        });
    } else {
        $('#content_' + msgid).slideToggle();
    };
});

Now, this works perfectly on my PC, but is unreliable on an iPad.

It SOMETIMES works, and I can’t figure out any pattern as to why/when it will work.

I did initially have the on bind look like this:

$('.headerRow').on('click', '.openCurrent', function (e).....

But after reading about a bug in mobile Safari, here:

jQuery .on() and .delegate() doesn't work on iPad

I changed it to the body, but it made no difference to behaviour.

I’ve also noticed previously that mobile Safari won’t trigger click events unless the element has CSS cursor:pointer in this case, I have that already in place as it makes sense visually on the desktop GUI.

Anyone got any ideas?

EDIT:

It doesn’t work in Chrome on iPad either!

Additional Edit:

I have also tried binding the click event to the headerRow element, but get the same problem

  • 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-18T04:24:09+00:00Added an answer on June 18, 2026 at 4:24 am

    Right… well, in case this of any help to anyone in future, I will answer my own question.

    The one thing I forgot to put in the question was the CSS on the elements, and it appears to be the hover selector causing the problem

    @media only screen and (min-device-width: 800px) {
      /* Hover only on PC, disabled for iPad */
        .headerRow:hover {box-shadow:2px 2px 2px #666;background: #c0c0c0;
            background: -moz-linear-gradient(top,  #c0c0c0 1%, #f0f0f0 41%, #f0f0f0 55%, #c0c0c0 100%); 
            background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#c0c0c0), color-stop(41%,#f0f0f0), color-stop(55%,#f0f0f0), color-stop(100%,#c0c0c0)); 
            background: -webkit-linear-gradient(top,  #c0c0c0 1%,#f0f0f0 41%,#f0f0f0 55%,#c0c0c0 100%);
            background: -o-linear-gradient(top,  #c0c0c0 1%,#f0f0f0 41%,#f0f0f0 55%,#c0c0c0 100%); 
            background: -ms-linear-gradient(top,  #c0c0c0 1%,#f0f0f0 41%,#f0f0f0 55%,#c0c0c0 100%); 
            background: linear-gradient(to bottom,  #c0c0c0 1%,#f0f0f0 41%,#f0f0f0 55%,#c0c0c0 100%);    
            -webkit-transition: all 0.2s;  -moz-transition:    all 0.2s;  -ms-transition:     all 0.2s;  -o-transition:      all 0.2s;
        }
    }
    

    I had a load of gradient CSS with transitions as per the above, now having wrpped it in

    @media only screen and (min-device-width: 800px) {}
    

    Stopping it from showing on the iPad it works fine.

    I tried excluding just the transitions first, but that didn’t do it, had to disable the entire hover CSS

    I have changed the on bind to .headerRow too and it still works, perhaps as Safari has been updating since that bug?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im having a small problem with my code. I have been trying to read
I've been told that I'd be better using PDO for MySQL escaping, rather than
I've been having trouble properly outputting the directory for images in a slider using
I am having trouble using system() from libc on Linux. My code is this:
Having been told by most of the savvy students around campus here, binary file
I have been having some issues with LINQ-To-SQL around memory usage. I'm using it
I've been having a hard time with Git since I started using it. It's
Having witnessed in various open source projects, in which I have been involved, several
I was wondering, after having read this question ... he has this code: public
Having read the documentation for VPython and GTK threading , it seems to me

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.