How do I change the link for mobile users?
<p>I have a button that opens up a pop-up window for a contact form, but the pop-up is not scrolling on mobile, so I was just thinking that it might be easier to change the button for mobile only. Is there a way to plug in some code to make this work for now?</p>

<p>The code for the button is:</p>

<pre><code>&lt;a class="book-now call-popup" href="booking-form.html" title=""&gt;Book Now&lt;/a&gt;
</code></pre>

<p>where if I take out "call-popup" it disables the popup and takes you to the url. Any way to set this up so that on mobile the "call-popup" is turned off/disabled?</p>

<p>EDIT:</p>

<p>Added the following</p>

<pre><code>function checkWidth() {
if ($(window).width() &lt; 758) {
    $('#popup').removeClass('call-popup');
} else {
    $('#popup').addClass('call-popup');
}
}

$(window).resize(checkWidth);
</code></pre>

<p>and</p>

<pre><code>&lt;a id="popup" class="book-now" href="booking-form.html" title=""&gt;Book Now&lt;/a&gt;
</code></pre>

<p>But it is not working. I mean, when I inspect the page, it IS working correctly, but it is still calling the popup even when the class has been removed for some reason. And strangely enough, it is working on my fiddle, but not my site:</p>

<p><a href="http://jsfiddle.net/5SM9u/51/" rel="nofollow">http://jsfiddle.net/5SM9u/51/</a></p>

<p>EDIT 2: Since it was asked, here is the popup js</p>

<pre><code>/*=================== Book Now Popup ===================*/
    $(".call-popup").on("click", function() {
        $(".booking-popup").fadeIn();
        return false;
    });

    $(".booking-popup").on("click", function() {
        $(this).fadeOut();
        return false;
    })

    $(".popup-inner, .datepicker").on("click", function(e) {
        e.stopPropagation();
    });

    $(".booking-popup .close-btn").on("click", function() {
        $(".booking-popup").fadeOut();
    });




    /*=================== Popup ===================*/
    $(".call-popup-alert").on("click", function() {
        $(".popup").fadeIn();
        return false;
    });

    $(".popup").on("click", function() {
        $(this).fadeOut();
        return false;
    })

    $(".simple-popup-inner").on("click", function(e) {
        e.stopPropagation();
    });

    $(".popup .close-btn").on("click", function() {
        $(".popup").fadeOut();
    });
</code></pre>