0

I generated an HTML button in jQuery that points to a page, it's appended to the end of a div. I'm able to click the button and go to the page in all browsers except IE, anyone know why that might be? The button shows in IE and is clickable, just doesn't take me to the page. Here is the code:

$("div.class:last-child ol").append("<button class='class'><a href='http://www.page.com' target='_blank'>Apply Here</a></button>");
Alexander O'Mara
  • 58,688
  • 18
  • 163
  • 171

1 Answers1

1

You are putting a <a> inside a <button>. It's not a good way. You can append <a> to the $("div.class:last-child ol") directly:

$("div.class:last-child ol").append("<a class='class' href='http://www.page.com' target='_blank'>Apply Here</a>");
hamed
  • 7,939
  • 15
  • 60
  • 114