title: What is the correct syntax for writing custom attributes in a jQuery method?
body: <p>I have a ternary ahead of variable instantiations. The problem is, that this is an incorrect way to assign a variable for an attribute.</p>
  
  <pre><code>$partial = $data.cell_info_box === undefined ? job_box : cell_info_box
  $rel     = $($data.$partial).attr('rel');
  $klass   = $($data.$partial).attr("rel").match(/job/) == null ? 'task' : 'job';
  </code></pre>
  
  <p>How can I provide my ternary like demonstrated but create callable attributes with my initial ternary's product?</p>