Hi,
I am trying to stop a SharePoint 2013 App Default.aspx page from refreshing and losing the changes to text. Every time I press the button the appended text appears for a few seconds than disappears after a few seconds as the app page refreshes.
1) Default.aspx
<asp:ContentContentPlaceHolderID="PlaceHolderMain"runat="server">
<button>Insert span element at the end of each p element</button>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</asp:Content>
2) App.js
$(document).ready(function () {
$("button").click(function () {
$("<span>Hello World!</span>").appendTo("p");
});
});
I am fairly new to SharePoint 2013 App development so I’m probably missing something simple.
I hope you can help
CEBlueSky