title: Adding a button, with onclick function, via javascript/jquery
body: <p>I'm struggling to find the correct syntax for adding a button via javascript/jquery that has a function attached.</p>
  
  <p>Right now I am trying:</p>
  
  <pre><code>list.append("&lt;button onclick='getFeed('http://open.live.bbc.co.uk/weather/feeds/en/PA2/3dayforecast.rss, showFeedResults')'&gt;ButtonTest&lt;/button&gt;");
  </code></pre>
  
  <p>But it returns:</p>
  
  <pre><code>&lt;button onclick="getFeed(" http:="" open.live.bbc.co.uk="" weather="" feeds="" en="" pa2="" 3dayforecast.rss,="" showfeedresults')'=""&gt;ButtonTest&lt;/button&gt;
  </code></pre>
  
  <p>Essentially, I want to be able to create</p>
  
  <pre><code>&lt;button onclick="getFeed('http://open.live.bbc.co.uk/weather/feeds/en/B1/3dayforecast.rss', showFeedResults)" class="ui-btn-hidden"&gt;
  </code></pre>
  
  <p>In javascript, But can't figure out how..`</p>
  
  <p>And I seem to be having trouble wrapping my head around creating html elements that use both single and double qoutation marks.</p>
  
  <p>Any advice would be greatly appreciated.</p>