I've tried all the suggestions I found and cannot make this button work on iPhone or iPad. It used to work a few months ago, and now it doesn't. It's fine for PCs. Have tried touchstart, and cursor:pointer; is already in CSS with no luck. Any other ideas? Go easy... I'm not actually a programmer.
HTML is:
echo '<td><span style="color:#fff;" thing1="'.$thing1Id.'" thing2="'.$row['thing2Id'].'" user="'.$user->ID.'" class="runScript btn" >Run!</span></td></tr>';
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery(".runScript").on("click",function(){
var me = jQuery(this);
var thing1= me.attr("thing1");
var thing2= me.attr("thing2");
var user = me.attr("user");
me.html("Working on it! Please wait!");
jQuery.ajax({
url: "/runScript?thing1=" + me.attr('thing1') + "&thing2=" + me.attr('thing2') + "&user=" + me.attr('user')
}).done(function(data) {
me.html("Done!");
console.log(data);
});
Give this a try:
jQuery(document).on("click", ".runScript", function() {
});