• Resolved mikeill

    (@mikeill)


    The following code works great outside of wordpress, but within wordpress plugin it seems to be reading the “target” as an expression; “unrecognized expression”).

    jQuery(document).ready(function($) {
    $("a[data-target=#myModal]").click(function(ev) {
        ev.preventDefault();
        var target = $(this).attr("href");
        // load the url and show modal on success
        $("#myModal").load(target, function() {
        window.alert(target);
             $("#myModal").modal({show:true});
        });
    });
    });
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘jQuery Modal within a Plugin’ is closed to new replies.