title: How to translate JQuery in Javascript to ScalaJS (scalajs-jquery)
body: <p>In my ScalaJS project I use <a href="https://semantic-ui.com" rel="nofollow noreferrer">Semantic-UI</a> with <a href="https://github.com/sjrd/scala-js-jquery" rel="nofollow noreferrer">scala-js-jquery</a></p>
  
  <p>I use this to monkey patch JQuery:</p>
  
  <pre><code>  // Monkey patching JQuery
    @js.native
    trait SemanticJQuery extends JQuery {
      def dropdown(params: js.Any*): SemanticJQuery = js.native
      def popup(params: js.Any*): SemanticJQuery = js.native
      // and more
    }
  
    // Monkey patching JQuery with implicit conversion
    implicit def jq2semantic(jq: JQuery): SemanticJQuery = jq.asInstanceOf[SemanticJQuery]
  </code></pre>
  
  <p>For example <code>$('select.dropdown').dropdown();</code></p>
  
  <p>translates to <code>jQuery(".ui.dropdown").dropdown(js.Dynamic.literal(on = "hover"))</code>.</p>
  
  <p>My problem now is how to translate this:</p>
  
  <pre><code>$('.ui.form')
    .form({
      fields: {
        dog: {
          identifier: 'dog',
          rules: [
            {
              type: 'adminLevel[2]',
              prompt: 'You must be at least a level-2 admin to add a dog'
            }
          ]
        }
      }
    });
  </code></pre>