I am using a tab panel WebPart that was given to me complete. The jQuery is repeating every-time the WebPart is edited so, the tabs repeat or get multiplied. I am using static information to populate the tabs. This does not happen when I am working in a publishing page unless I specifically click on the edit web part.

  • 1
    Without the code of the webpart it will be almost impossible to help you Commented Sep 28, 2016 at 18:01

1 Answer 1


SharePoint adds a hidden control with a value which tells the client side code if the page or WebParts on that page are in Edit Mode.

In case of Wiki Pages, the id of the control is _wikiPageMode and in case of Publishing pages, it is MSOLayout_InDesignMode.

You can put your code inside an if statement like below to know if your page is in design mode and stop execution of code.

if($("#_wikiPageMode").val() "Edit" or "" ||
      $("#MSOLayout_InDesignMode").val() "1" or "") {

      //Your existing code here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.