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.

7
  • 1
    What are you trying to do? This doesn't make any sense to me. Commented Jun 10, 2014 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
    Commented Jun 11, 2014 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? Commented Jun 11, 2014 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
    Commented Jun 11, 2014 at 14:39
  • 1
    I'm from Brazil
    – Renanfdo
    Commented Jun 11, 2014 at 17:52

1 Answer 1

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.

1
  • Does not work, nor in $(document).ready
    – Renanfdo
    Commented Jun 11, 2014 at 11:33

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.