title: What JavaScript/JQuery syntax is this?
body: <p>I have no idea how to search for this so I'm asking here.</p>
  
  <p>I've inherited a project and no one that's here knows what this syntax trick is called.</p>
  
  <p>There's a select drop down change event that will call a function if one or another specific value is selected from among the list.</p>
  
  <pre><code>$('#accordion select[name=x_range]').change(function(){
    $('#custom-time')[$(this).val() == 'custom' ? 'show' : 'hide']();
    $('#custom-time-to-now')[$(this).val() == 'custom_to_now' ? 'show' : 'hide']();
    updateTimeIntervalOptions();
  }).triggerHandler('change');
  </code></pre>
  
  <p>In this the show or hide function is called on the <code>#custom-time</code> or <code>#custom-time-to-now</code> divs.</p>
  
  <p>What is calling functions like this called?</p>
  
  <p>EDIT:<br>
  I should have said that I understand ternary if/else, but not the <code>$(selector)[function_name]()</code> part.</p>