Jquery find test

Benchmark created on


Description

no

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div id="waybillEditor" class="m-waybill-editor none">
  <div class="ui-toolbar">
    <div class="fl">
      <div class="ui-button ml3 mr3">
        <button>
          选择字段
        </button>
      </div>
      <div class="ui-button mr3">
        <button>
          <span>
            保存
          </span>
        </button>
      </div>
      <div id="operationBtn" class="ui-button mr5">
        <button>
          操作
          <span class="ui-button-arrow">
            &nbsp;
          </span>
        </button>
        <ul style="width: 110px" class="ui-menu none">
          <li class="ui-menu-item">
            <a id="preview" href="javascript:void(0)">预览</a>
          </li>
          <li class="ui-menu-item">
            <a id="print" href="javascript:void(0)">打印测试页</a>
          </li>
          <li class="ui-menu-item">
            <a id="changeName" href="javascript:void(0)">修改模板名称</a>
          </li>
          <li class="ui-menu-item">
            <a id="setOffset" href="javascript:void(0)">设置整体偏移量</a>
          </li>
        </ul>
      </div>
    </div>
    <div class="m-property-setter fl">
      <label>
        快递单尺寸:
      </label>
      <label>
        宽
      </label>
      <input class="waybillWidth">
      <label>
        高
      </label>
      <input class="waybillHeight">
    </div>
    <div class="m-property-setter fr mr10">
      收货人姓名属性:
      <label class="fieldLeft">
        左
      </label>
      <input>
      <label class="fieldTop">
        左
      </label>
      <input>
      <label class="fieldWidth">
        宽
      </label>
      <input>
      <label class="fieldHeight">
        高
      </label>
      <input>
      <label class="fieldFontSize">
        字体
      </label>
      <input>
    </div>
  </div>
  <div class="m-waybill-editor-body">
    <img src="http://sencha.com/s.gif" />
    <label style="left:5px;">
      发货人姓名
    </label>
    <label style="top:25px; left:5px;">
      发货人地址
    </label>
    <label style="top:50px; left:5px;">
      发货人电话
    </label>
  </div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/mootools/1.3/mootools-yui-compressed.js">
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
find1
var editorToolbar = $('.ui-toolbar');
editorToolbar.find('input.waybillWidth').val(template.width);
ready
find2
var editorToolbar = $('.ui-toolbar');
editorToolbar.find('.waybillWidth').val(template.width);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.