From the course: jQuery: Creating Plugins
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Determining and adding appearance options - jQuery Tutorial
From the course: jQuery: Creating Plugins
Determining and adding appearance options
- In this video, we're going to add some options that can control appearance of some items in the plugin. Now, looking at this gallery, we have some funky stuff going on because of some of the tags that we've chosen for these captions that don't have CSS Styles. In general, of course, we do want things to be controlled with CSS. It keep everything in one place, and it keeps a clean separation of your code from the way things look. That said, it is helpful to your plugin users, and remember you are one of your plugin's users, to add options for certain kinds of appearance. In this case, we'll just do colors, because they're easy to do, and you don't get into complicated things relative to layout, as you would if you added in options for margin, padding, spacing, all those other kinds of things. So, what we'll do, is we'll add some options to change the frame color and the text color. So let's switch over to the documents in the text editor and see what's up. Here in the HTML document…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Writing the code: Always the first step3m 34s
-
Converting the code into a plugin4m 22s
-
Making the plugin configurable with options7m 39s
-
Determining and adding appearance options3m 50s
-
Grouping related options for better usability4m 25s
-
Protecting your plugin by validating user input5m 54s
-
Challenge: An AJAX-enabled ads plugin4m 59s
-
Solution: An AJAX-enabled ads plugin3m 44s
-
-
-