title: How to add data toggle to link tag if ul is present in the li
body: <p>Please see the below code i have for my main menu on my website.</p>
  
  <p>I want to add a data-toggle to the link tag for the dropdown but when the li doesnt contain ul I dont want the data-toggle added to the a tag. Would jquery be able to do this?</p>
  
  <p>I am using bootstrap for this but in my menu I have menu links with no dropdown and the link url i add doesnt work as its expecting a dropdown to appear, if there a way around this?</p>
  
  <p><code>&lt;ul class="nav navbar-nav"&gt;
      &lt;li class="dropdown yamm-fw"&gt;
          &lt;a href="#" class="dropdown-toggle"&gt;Menu 1&lt;/a&gt;
          &lt;ul class="dropdown-menu"&gt;
          &lt;li&gt;&lt;a href="#"&gt;Menu Item&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li class="dropdown yamm-fw"&gt;
          &lt;a href="#" class="dropdown-toggle"&gt;Menu 2&lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="dropdown yamm-fw"&gt;
          &lt;a href="#" class="dropdown-toggle"&gt;Menu 3&lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="dropdown yamm-fw"&gt;
          &lt;a href="#" class="dropdown-toggle"&gt;Menu 4&lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="dropdown yamm-fw"&gt;
          &lt;a href="#" class="dropdown-toggle"&gt;Menu 5&lt;/a&gt;
      &lt;/li&gt;
  &lt;/ul&gt;</code></p>