BTEC Level 3 Diploma and Extended Diploma in IT Practitioners Software Development
Unit 20 Client-Side Customisation of Web Pages
ASSIGNMENT 2 Scripting Language template (P3)
Task 1 - Using examples from your practice websites or the internet explain the main features of the JavaScript / jQuery scripting language (P3).
Date: 29/03/2019
1. What is the purpose of a scripting language in web design? (what are scripts used for, what are the benefits to users?}
Answer
Using scripts in web design is there to change the behaviour aspects of the webpage. An example could be an accordion and how that works but then
there are also features of changing the way something looks and displays itself. The benefits are that the styles can be changed so that the website can
be specific to what’s being talked about or what the topic is. Overall, it means that the website is more interactive, instead of just being a stack website.
By this I mean that there can be pop-ups that make the user click on them or it could be something as simple as adding buttons to the page.
2. How can a scripting language be added to a HTML page? (there are 3 methods of adding scripting to a page)
Method Explain how the script is added to the page Screen shot of script code added to the page
External An external style in JQuery is set up in this format, where
you call the script from another file. With the code example
I used it can be called with one line but there are AJAX and
Dynamic loading which can be done differently.
Internal An internal style in JQuery is set up in a format where the
document gets called first and then the code for the
internal style will play. However a ready function can be
added which then can have other things inputted after that.
, Inline The inline style in JQuery, can be done in many different
ways it depends on how much you want to write for it.
With the example I used it makes it so that you don’t need
to use the $(document).ready(function)) as the
DOMContentLoaded event has been used instead.
Briefly explain when and why a doc.ready statement is used?
The doc.ready statement is used when needing to determine the state of a document. The jQuery detects the state of readiness and the code will only
run once the JavaScript code is executed after the statement inside the doc.ready has run.
3. What are selectors, events and effects? – give examples of how each are used in jQuery.
Describe what this does in the jQuery code Screen shot of this being used in jQuery code
Selectors A selector in jQuery code is a function in which makes use of
expressions to find some matching elements based on a criteria.
The selector can be used to select an amount of HTML elements
using jQuery, once an element is selected it can perform various
operations.
Events The events within jQuery are actions that can be detected but a
web application. There are examples like a mouse click, a page
loading, or a keystroke on your keyboard. Once the events are
triggered you can use those custom functions to do whatever you
want with the event.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller ItsKenzie. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $10.31. You're not tied to anything after your purchase.