0

以下 jquery 代码片段不会在点击时触发。你能帮我弄清楚为什么吗?

StackOverflow 说我需要更多细节。我道歉。我想不出任何进一步的相关细节。代码对我来说似乎很不言自明。如果您想到我可以添加的任何细节,请发表评论。

这是HTML:

<div class="footer_all_pro clearfix">
         <ul class="Printing-options clearfix">
         <li>Shipping Labels:</li>
                    <li class="print-usps-label shipper-logo"><a href="#"><img class="print-label-logo" src="/dev/skin/images/logo_endicia.png"></a></li>
                            <li class="print-label shipper-logo"><a href="#"><img class="print-label-logo" src="/dev/skin/images/logo_ups.png"></a></li>
                            <li class="print-fed-label shipper-logo"><a href="#"><img class="print-label-logo" src="/dev/skin/images/logo_fedex.png"></a></li>
                   <li class="print-invoice"><a href="#">Packing Slip</a></li>
         <li class="print-pick"><a href="#">Pick List</a></li>
                    <li class="print-scan"><a href="#">SCAN Report</a></li>
                   <li class="del-scr"><span><img src="/dev/skin/images/print-pick.png"></span><a href="#" style="margin-top: -20px;">Delete</a></li>
          <li class="del-arc"><span><img src="/dev/skin/images/print-pick.png"></span><a href="#" style="margin-top: -20px;">Archive</a></li>
          <li class="send_email"><span><img src="/dev/skin/images/print-pick.png"></span><a href="#" style="margin-top: -20px;">Send Email</a></li>
         <!-- <li class="del-all-inv"><span><img src="/dev/skin/images/print-pick.png" /></span><a href="#" style="margin-top: -20px;">Delete All</a></li>-->
         </ul>
          </div>

这是jQuery:

   $( ".print-scan a" ).click(function(e) {
 console.log("scan clicked");
        var $dialog = $("<div />")
                      .dialog({
title: "Confirm SCAN Report",
modal: false, 
resizable: false,
scrollable: true,
width: 65, 
position:['middle',130],

buttons: { "No": function() { $( this ).dialog( "destroy" ); return false;}, 
           "Yes": function() {
console.log("yes clicked"); 
$( this ).dialog( "destroy" ); return false;
        /*
        $(this).datepicker({
            //showOn: "button",
            //buttonImage: "/skin/images/datepicker.png",
            //buttonImageOnly: true,
            onSelect: function(selectedDate) {
console.log("date selected");
               $(".request-print-label")
                 .attr("action",envPath + "/partner/uspsscan")
                 .append('<input type="hidden" name="rpt-date" value="'+selectedDate+'" />')
                 .submit();
               }
            });
        */
        }
      }
    })
    .html("<span>CAUTION: Once shipping labels are included on the SCAN Report, you will be unable to issue refunds for these labels. Proceed anyway?</span>")
    .dialog("open");
    }

谢谢,克里斯。

4

1 回答 1

0

您没有正确关闭点击功能,缺少 ); 在最后

于 2014-03-15T11:12:33.620 回答