Sha256: b08679bfcc2ec14a8a54805bcf35bf5ac44b40f7f199a01e2d0875f4cbcbc293

Contents?: true

Size: 1.43 KB

Versions: 7

Compression:

Stored size: 1.43 KB

Contents

<!DOCTYPE html>
<html>
  <head>
    <title>Test</title>
    <%= "<script src='../vendor/jquery-#{@jquery_version}.js'></script>" %>
    <script src="/assets/javascripts/da-js.js"></script>
    <script>$.fx.off = true;</script>
  </head>
  <body>
    <h1>Test: Conditional Visibility</h1>
    <form id="simple_form" action="">
      <div class="field">
        <label for="country">Country</label>
        <select id="country">
          <option></option>
          <option>Austria</option>
          <option>Other …</option>
        </select>
      </div>
      <div class="field" data-visible-if="$('#country option:last').is(':selected')">
        <label for="country_other">Other Country</label>
        <input id="country_other">
      </div>
      <div class="field">
        <label for="message_checkbox">I want to leave a message</label>
        <input type="checkbox" id="message_checkbox" checked>
      </div>
      <div class="field" data-visible-if="$('#message_checkbox')[0].checked">
        <label for="message">Message</label>
        <textarea id="message"></textarea>
      </div>
      
      <div class="field">
        <label for="amount">Amount</label>
        <input type="string" id="amount">
        <span id="amount_info" data-visible-if="$('#amount').val() != ''">You’ve entered something!</span>
      </div>
    </form>

    <script>
      $("form").conditionalVisibility(<%= params[:options] %>);
    </script>


  </body>
</html>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
da-js-1.2.1 features/support/testapp/views/conditional_visibility.erb
da-js-1.2.0 features/support/testapp/views/conditional_visibility.erb
da-js-1.1.2 features/support/testapp/views/conditional_visibility.erb
da-js-1.1.1 features/support/testapp/views/conditional_visibility.erb
da-js-1.1.0 features/support/testapp/views/conditional_visibility.erb
da-js-1.0.0 features/support/testapp/views/conditional_visibility.erb
da-js-0.2.0 features/support/testapp/views/conditional_visibility.erb