jquery does not work in Preview mode

gourisankar padihary asked on March 15, 2015 17:10

Hi, I am using Bootstrap tabs in one of my page. In each of the tab I need to put editable we part, so that in preview mode, various text can be entered. Tabs seem to work fine in Live mode, but tabs are not working in Preview mode. I am using some jquery script to show /hide the tabs which seems to be failed in Preview mode.

What is the workaround to solve this issue? I am using Kentico 8.2. Please suggest.

Recent Answers

Brenden Kehren answered on March 15, 2015 18:10

Technically you cannot add or make modifications to the page in "Preview" mode. You can only make changes to content in Edit mode.

0 votesVote for this answer Mark as a Correct answer

gourisankar padihary answered on March 16, 2015 06:29

Let me correct myself. In the design mode only jquery does not work, but the same script works in Live mode. I put the editable web part, so the content of this web part, I want to put in the design mode(when I click on "Page") while designing the site, that time Jquery does not work.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 16, 2015 12:37

Any kind of javascript you have will most likely conflict with the javascript that is used within the Kentico UI. I never expect any javascript to work 100% while in design mode, I always test in a different browser while logged out to ensure it is working as expected. If you're trying to code around the javascript in the Kentico UI to get your application to work, you'll spend a lot of time I'm guessing to get things working.

I do believe there are a few places you can check to see what ViewMode the site is in: Macros, C# code, cookie. Those might help but don't believe they will resolve the issue.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.