Setting Up Brackets
This three-part video will show you how to set up Brackets, a free open-source code editor by Adobe.
This three-part video will show you how to set up Brackets, a free open-source code editor by Adobe.
This demo series will show you how you can make your navigation mobile friendly and accessible using jQuery whether javascript is enabled on the client-side or not.
This series is approximately 45 minutes long. You should expect it to take at least twice that time to do complete the work.
1 – Menu setup (18min)
2 – jQuery setup and custom script (17min)
3 – Styling the menu for proper behavior (13min)
Please watch all videos below to complete the tutorial.
This demo contains a 9-video demo series that will teach you how to make a single web page with a jQuery page-scrolling easing effect. The software demonstration is done in Dreamweaver, but you could also follow along with any decent script editing program.
Level :: Beginner
Let’s say you want to create a function that automatically adds the sales tax into a subtotal to give you a final price. We will call it “Total” and the tax will be 7.75%, as follows:
function Tax($subtotal) {
return $subtotal *= .0775;
}
What this will do is take any value called by the “Tax” function and substitute that passed value in place of “$subtotal
.” For instance, if we are explicit and want to find the tax on twenty dollars, we could invoke the function as follows:
$tax = Tax(20);
echo "\$$tax";
This would result in outputting the string (no quotes) of ” $1.55 “. You could produce the same results by running the function on a variable instead of a raw number:
$amount = 20;
$tax = Tax($amount);
echo "\$$tax";
It is important to note that functions are self-contained. What happens with variables inside of a function is invisible to the rest of the script outside of the function. When variables are passed as arguments to a function, only the value is passed; thus, once the function completes its task, the variables inside of it cease to exist, and they are only created or invoked again if the function is reused.
“The scope of a variable – in other words, where it can be used – depends entirely on where the variable is defined. A variable defined in a function or as one of its parameters is limited in scope to that function. It cannot be seen outside the function. Equally, a function has no knowledge of or influence over variables outside.”
(from Adobe Dreamweaver CS5 with PHP by David Powers)
To learn how you can create a user-defined gallery function, go to the “Creating a Gallery Function” demo page. It will show you how you can write a customizable gallery function that scans gallery directories to populate thumbnail galleries with larger lightbox effect opening images. No database necessary. . . . Additionally, it covers the concepts important to reusable code (i.e. functions).