Curtis Thompson
Forum Replies Created
-
hello…
ya – i will throw in the wrinkle that it’s also not a rule written in stone, but it’s one that i try to follow – especially in these days of mobile where a lot of people might be hitting your site with only a cellular connection speed, it’s nice to be nice, especially if you are a business…
just be happy – back in the days of dial-up when the ‘net was just getting started, we had to limit ourselves to 20kb at a max for all the 14.4 modems. 🙂
sitruc
-
hello…
there’s a clarification point here that i should have made – for inside pages that one would expect to have a lot of content (not all, mind you – but ones like that tutorial page), a page size rule is less important – for example, if you had a gallery page that showed off your work, i would expect going in that there would be a lot of images there. plus, i’d have to make the active decision to click a menu item to go there.
it’s the cases where you have a page such as a home page where a visitor has no choice but to go to get to your site – there you want to avoid things like music, large graphics and slow load times. that page is your first impression, and the cleaner and quicker (and better) it is, the more likely they are to stick around and go elsewhere…
does that help clear it up a bit?
sitruc
-
hello…
well – when it loaded for me there was unpleasant layering of images as they somewhat filled in/loaded. the problem is that you are at about 15 times what is considered a good size for people to have to download. if i tried to visit your site on a mobile network, it would take several minutes to load all those images, for example.
also trust me – people will maybe stay on the home page for 5-10 seconds…so you are loading several images that they just won’t see there – why load that content for nothing? think about creating a gallery where the person can see your work and they know what they are getting into ahead of time.
sitruc
-
hello…
nice! a warning though – you have 12 images that average around 300kb or so (it seems) for that top art block – that’s 3.6mb of data your page has to load. a good web page should be around 100kb – 200kb total, so you might want to consider making those jpgs and compressing them a bit. note also that most people won’t spend anywhere enough time on your home page to see all 12 anyway, so you could easily pick 3-4 and put the rest in a clickable gallery somewhere…
sitruc
-
no problem – always good practice to keep the skills sharp… 🙂
-
hello…
you’d have to work on the factor math to get them all to move at the same speed, but here’s the same script moving multiple images:
https://sitruc.com/cow/js_image_move/index_multi.html
sitruc
-
hello…
the example i wrote here is a good argument for why one would use jquery. i wrote all the code here to move the image, but in jquery, that’s all bundled in there, so you don’t have to reinvent the wheel each time. but it is good to know how it works if you want to be a javascript coder in general, as it makes life much easier. i just come from a time when things like jquery didn’t exist, so everything had to be written out like this… 🙂
[Simon Matthews] ” Perhaps there is a jQuery script to achieve this effect?”
there are lots of code examples for jquery out there that are similar to this. you’d just have to get comfortable with how to use it. you could also pretty easily modify this example here that i wrote to do this effect.
[Simon Matthews] “What are the benefits of using Firebug over Dreamweaver”
well – for me, since i don’t use dreamweaver, they are endless… 🙂
but if you have a good enough console in dreamweaver then go ahead and use that – note however that all browsers now have a version of it, and you might see things in different browsers that dreamweaver wouldn’t show…
sitruc
-
hello…
i think it’s easier to just write you an example as opposed to trying to debug what you have – you were going a bit far down some rabbit holes that might be hard to pull you out of… 🙂
here’s what i wrote sans jquery:
https://sitruc.com/cow/js_image_move/
view the source on that to see how it works. also note that i used the console for debug/logging purposes – you should get used to using that as well, as it can be very handy to tell you what is going on. here’s how to use that:
https://stackoverflow.com/questions/4743730/what-is-console-log-and-how-do-i-use-it
if you have any questions, let me know!
sitruc
-
hello…
well – you can embed videos in html5 using a variety of techniques and libraries. in xhtml, you could use the object tag to embed videos from youtube and places like that, though…have you tried that?
as for your form – there are a lot of ways to go about that. in theory, what you’d have would be a db of sorts that had an account entry per submission. it’d have fields like:
– name
– email
– signed_nda (T|F)
– validated (T|F)and whatever else you wanted to collect. and then in your form, you’d have your non-disclosure agreement in a textbox or scrolling div with a checkbox that says “ya i agree to this.” then when they submitted the form, you’d put an entry in that had “validated” set to “F”. you’d auto-generate an email to the address they provided and then send it to them with a link to a page that validated an account – so something like foo.com/verify.php?email=[EMAIL]. then when they got the email and clicked that link, that page would look up that account by that email and toggle validated to “T” and they’d be validated. at that point you could link them to stuff that you didn’t want them to see prior to that.
you could use a db system or just a flat file with delimited entries to do that db portion. any server side scripting language would work for the processing part…depending what you had available to you.
does that answer your question?
sitruc
-
hello…
in this case, window.setTimeout() will be your friend:
https://www.w3schools.com/jsref/met_win_settimeout.asp
basically what you would do is create a function that moves the image to a specified x/y place, and then you could call that function with new coordinates after any desired pause in milliseconds via setTimeout().
also i’ll throw out javascript libraries as an option – you are learning the manual way, which i do highly recommend. that’s because you then see how things are actually working. but once you get that going, it can be done this way as well:
https://viralpatel.net/blogs/understanding-jquery-animate-function/
that’s using jquery. all jquery is underneath is all the javascript that you are writing here yourself and then packaged up nicely in functions. so definitely learn about this as much as you can by hand, but then also consider implementing something like jquery to do the heavy lifting for you…
sitruc