1

I need to know how I'm going to focus on making a page when the user opens the page.

Have tried using SP.SOP.executeOrDelayUntilScriptLoaded and it does not work. After the DelayLoaded run it back as it was.

I'm trying this:

SP.SOP.executeOrDelayUntilScriptLoaded(function(){
    $("body").attr('class',"ms-fullscreenmode");
    $("#fullscreenmode").css("display", "none");
    $("#exitfullscreenmode").css("display", "");
}, "sp.js");

Still does not work. After a few seconds it returns to normal.

  • 1
    What are you trying to do? This doesn't make any sense to me. – Eric Alexander Jun 10 '14 at 21:18
  • Brother, if you want to come put pointless comment will not mess up. I just want to open a window already maximized. – Renanfdo Jun 11 '14 at 11:46
  • Your question do lack a lot of information regarding what you are trying to accomplish, like is this in a modal or are are you trying to simulate a click on the "Focus on content" button? – Robert Lindgren Jun 11 '14 at 12:00
  • Therefore, I am trying to simulate a click on Content Focus, but after clicking it back to normal, I want to click the first place. Like it was already opening a Focus Content – Renanfdo Jun 11 '14 at 14:39
  • 1
    I'm from Brazil – Renanfdo Jun 11 '14 at 17:52
0

I also don't fully understand, but it seems you want to do jQuery stuff after the page is loaded... You should use the jQuery's ready command not SharePoints executeOrDelayUntilScriptLoaded command.

$(function(){
    $("body").attr('class',"ms-fullscreenmode");
    $("#fullscreenmode").css("display", "none");
    $("#exitfullscreenmode").css("display", "");
});

On another note, I wouldn't edit sytles via jQuery if possible... It seems you can do this via css.

| improve this answer | |
  • Does not work, nor in $(document).ready – Renanfdo Jun 11 '14 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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