Page Loads Slowly - Page Loads A Second Or So Slower With Each One Added
Dec 2, 2011
I read that $(document).ready(function() might slow me down but I do not see that statement in any of my .js files.
I have a slide show program. First theres stuff to set up the array, and the time between slides Then a function startIt()is defined then a function stopIt() Then two buttons, Start and Stop, which when pressed call the relevant functions.
When the page loads, you have to click the Start button to get the slide show running, but I'd like it to start running straight away without having to click. I can't for the life of me figure this out. I thought it was just a question of putting the line startIt(); Code:
To begin, I'm a novice at this. I'm using 2 JQuerys on a page -
The first fades a page in and out when loading. The second 'smoothly' scrolls the page down to anchor text in the page. The problem is that the 1st script 'overpowers' the second, so when you click on an anchor text link it starts to 'smoothly scroll down, then the first script kicks in an re-loads the page. Is there a way of stopping the first script if the second one is being used?
Say now, you want to try and do some animation done by default, in the below example I have done some animation only when the user do mouse over, how can i do that by default as in when the page loads.
I have a text box to which I give focus when a page loads. There is more than one submit button on the form. When I enter something in the textbox then hit Enter the first submit button on the form is activated. Is there some simple code I can use to shift focus to the submit button I want as I press Enter?
The problem is the page tries to load all the images when opened. And when the user clicks "next" to view other photos, the other photo is still loading where as some are already loaded.I would like the code to be able to load the photo that the user is currently viewing as the user gets to that picture, before the page tries to finish loading all the photos.In other words, if the user wants to view a particular photo directly, that photo should get the priority of loading quickly.
I have long html/CSS (no CMS or php, etc.) web pages. Some people run away when they see too much content on a page. So I hide the large lower section of the pages and have the user click anchor text to execute simple JS code to change the display from 'none' to 'block' or back to re-hide.
(BTW my research indicates that search engines do not know the difference between display='none' and normal content, or I would not be hiding content in the first place.)
Within this hidden content, I have anchor text to provide name handles
So users can click a link and go directly to that section. Within that link I include
So that works fine within a particular page. But when I want to link to an anchor on another page which is within this hidden content, the browser cannot display the anchor text because it is still hidden.
Is there a way to execute the JS code to change the DOM, changing the display to 'block' on the content of the new page?
I do not see how, because the new page isn't loaded yet, there is no DOM within the browser yet, so how can it be manipulated?
Of course if I was using php I could generate the code with the property set as desired. But for straight up html/CSS/JS pages is this possible?
I get the feeling I am missing something simple here, either a simple solution or the simple fact that this is just an inherent limitation of html.
I am utilising this code from Dynamic Drive to create a drop down which loads a PHP page in a DIV. This all works great.
However the content of my PHP page retrieves data from a SQL database slowly before loading completely. Is there anyway I can incorporate some 'Loading...' text into the script so the user knows not to click again.
I was thinking that I could set the Div's value to a html file with the loading data while the PHP loads and then revert to the other page. Is there a way of doing this?
I have a bona fide link to an academic website at Florida University where I want to check out an educational Java applet about the universe. I downloaded and installed the latest Java but all 3 browsers crash when I try to open the page. ( Mozilla, IE and Opera). I am not going to post the link here until asked to / given the go-ahead, but like I said, this is a legitimate university website. What keeps happening? Others can open it, I can't. And I have Java enabled in FF.
I am launching a web page in an iFrame and then clicking the "Start Tests" button provided by QUnit. All the tests for the loaded page correctly show asserts for each test. I then do $('selector').trigger.('click') to go to a new page. Since the tests for this page start running before the page is completely loaded I see failed asserts. This is expected.
So then I try something like:
What happens is that I see no assert result in the QUnit test report for 'test C'. If I remove the stop, setTimeout, and start calls then I see the assert, but of course if fails.
I am aware that unit tests are supposed to be independent of each other and not need to run in a certain order, i.e. scenario testing. What I want to know is if QUnit supports some way to pause and then restart groups of tests.
My site, lizbmorrison.net, uses an adapted version of superbgimage and I've been trying to find what controls the visibility of #showtitle. Currently its automatically hidden when the page loads, and can be toggled by the info button in the lower right corner, but I'd like it to be visible by default.