How to avoid loading times so that the user doesn't see two different styles? This can be observe during the first two seconds of loading.
Please refer to the following screenshot,
Compare the Search Menus
In your case I would set the menu CSS to #menu select {visibility:hidden;} initially, and then change back to visibility:visible; on page load -- using Javascript or jQuery, or at the end of the CSS style sheet.
// Change menu select styles on load with jQuery
$(function() {
$('#menu select').css('visiblity', visible');
});
or
<script>
// Plain javascript hiding an entire menu div group
document.getElementById('menu-container').style.visibility = "visible";
</script>
Put CSS at the bottom will make your webpage "white" for until all the style sheet is loaded.
This causes the blank white screen problem. The page is totally blank
until the stylesheet at the bottom is downloaded, on the order of 6-10
seconds for this page. The browser is waiting for the stylesheet to be
loaded before it renders anything else in the page, even the static
text.
Compare with Put CSS at the top
(from High Performance Websites - Steve Souders)
Related
Upon page refresh using animateAnchor: false, for a second I see the first image / slide presented on the site, rather than instantly loading the slide that is anchored. It looks like a small glitch. Is there any way around this problem?
That makes total sense if you are importing the fullpage.js file before the closing body.
That way you'll have to wait for fullPage.js file to load and then to initialise and meanwhile you'll see your site as it is before using fullpage.js.
Try importing fullPage.js on the head of your site, this way initialisation will be faster.
Also, you can use the following CSS in your stylesheet so sections will be 100% height even before loading fullPage.js:
#fullpage,
.section,
body,
.fp-tableCell,
html {
height: 100%
}
Assuming #fullpage is your fullpage wrapper and that you use the default selectors for sections and slides. (.slide, .section)
I'm modifying a website, built with AngularJS, and in one page I have a WYSIWYG editor.
The whole widget that includes the editor, is a div that has 'ng-controller="TextsController"'.
In this div I have a button, clicking on it displays the editor. And the initializing of the editor happens in a directive - "richTextEditor".
So - I'm making a popup in this editor, that has to show some images from the server. I put the code for pulling the images in the controller ... and there I set
$http.get('/url/to/files').success(function(data) {
$scope.imagesFromServer = data;
});
and in the view I have
'ng-repeat="image in imagesFromServer"'
And the problem is that the ngRepeat doesn't see any items.
I have two ideas:
The view, containing the ngRepeat (the HTML for the editor, and the popup with the images as well) loads with AJAX, and at that very moment the scope variable is not set.
I'm initializing the scope variable in the wrong place. (Eventually has to be in the directive instead of the controller? ... but all examples I've seen and done so far - pull every data in the controller, and the view sees it directly.)
Hope I've described the situation clearly.
Thanks in advance.
I am trying to implement CKEditor v4.3.2. The way our product is set up is there are multiple areas of our pages that can be edited - we open an editor in a modal window and use the iframe method for editing. It works great with one exception:
If the page DOM looked something like "body > div#container > div > div#editcontent"
and there was CSS rules targeting that DOM then the CSS does not apply in the editor because the editor DOM is simply "body"
What I would LIKE to do is supply the editor with the HTML DOM Structure of the page that holds the editor so the ContentCSS rules that normally impact the div would still apply (e.g. white background in the div instead of background color from the body tag)
I am at a loss for how to accomplish this.
Thanks!
If you want the content of editor to inherit styles of your page, so a full integration with all the styles applied with every kind of selector, then you would have to use inline editing. Only inline editing offers that.
When using classic editor (the one using iframe) you still have an option though. It's the config.bodyClass setting which lets you assign a class to the body element into which contents is loaded. Then, if all your contents styles selectors starts with that class and a stylesheet is loaded using the config.contentsCss setting, the content inside editor will look similarly to your final page.
I am using DOMPDF library to generate invoices dynamically. My use-case scenario is to leave around 3 inches of space on top of each page. On the first page i created it using a blank div with appropriate height.
Now on second page, it doesn't take the required height from very beginning for obvious reasons. any suggestions?
Instead of spacer divs just set the page margins in css with:
#page { margin-top: 3in; }
i need a jquery plugin where i want to load the module by default as HTML and upon clicking more link it should load the rest of the content via AJAX and then previous button should be enabled.
Currently when i google i can get lot of plugin which just load either via AJAX or Animation [by hidding the rest of the content]. But for performance issue i don't want to load all the content at one shot and then animation. So i want to load the 5 li's and upon clickiing "More" it should start loading the remaining content but it should also animation.
Could someone help me on this?
-- Bala
My advice to you would be to customize the jCarousel according to your needs. Specifically, when you render the page initially you can include the initial 5 elements of your carousel. Then, in the carousel's onchange event, once you reach the last slide you can use AJAX to pull in the additional images.
Depending on your needs, using jCarousel driven by a flat JavaScript array you could save some load time as the image URLs would be rendered in the original markup, but not downloaded by the browser until they are added to the visible portion of the carousel. No AJAX required. Here's a demo.