ckFinder - 使用jQuery模拟刷新点击

时间:2012-09-17 18:26:58

标签: jquery ckfinder

尝试让jQuery在加载标签时模拟点击ckFinder的刷新按钮。无论我使用什么代码,点击都不会注册/提醒。使用Firebug,我抓住了刷新按钮源:

    <a onclick="window.parent.CKFinder._.callFunction(3, this); return false;" 
    onfocus="window.parent.CKFinder._.uiButtonFocus(1, event);" 
    onkeydown="window.parent.CKFinder._.uiButtonKeydown(1, event);" 
    onblur="this.style.cssText = this.style.cssText;" aria-labelledby="cke_10_label" 
    role="button" hidefocus="true" tabindex="-1" title="Refresh" 
    href="javascript:void('Refresh')" class="cke_button_refresh cke_off" id="cke_10" style="">
    <span class="cke_icon"></span>
    <span class="cke_label" id="cke_10_label">Refresh</span></a>

我已尝试过以下代码示例,甚至转到root / generic标签,这些标签不起作用。

   $('span').click(function(){
     var t = $(this).text();
     alert(t);
   });

  $("#cke_10").click(function() { alert('cke_10'); });
  $("a").click(function() { alert('a click'); });
  $("a#cke_10").click(function() { alert('a cke click'); });
  $("#cke_10_label").click(function() { alert('cke label'); });
  $("span#cke_10_label").click(function() { alert('span cke label'); });

任何人都有幸在点击时点击“刷新”按钮提醒?

1 个答案:

答案 0 :(得分:0)

事实证明,我有两个ID都被设置为“id”,令刷新混乱。然后使用此代码:https://stackoverflow.com/a/4249906/850904我设法根据需要刷新iFrame。