![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Professional Programmer
|
Adding div elements with JavaScript
I have a page which lists information on courses Link. I am trying to create a back to top link after the information for each course.
Each section describing a course looks like this
<div class="article">
<div class="courseTitle">SCI202 CHEMISTRY 1.0 Cr.<a name="chemistry" id="chemistry"></a></div>
<div class="courseCategory">Prereq:</div>
<div class="content">Having passed Integrated Physics and Algebra 1 or Algebra A-B.</div>
<div class="courseCategory">Description:</div>
<div class="content">
<p>This course is designed for sophomores who have successfully completed Integrated Physics and Algebra 1 or Algebra A-B. The subject matter includes the study of the following topics: scientific methods, matter, energy, atoms (behavior and interactions), periodic table, gases, liquids, solids and stoichiometry. This course is designed to give the student an overview of the basic concepts of chemistry, including how chemistry relates to biology, physics, and earth science. Students will use various forms of technology to collect, analyze, and report data.</p><p><strong>This course is required and is a prerequisite for biology.</strong></p>
</div>
</div>Any hints or tips are welcome.
__________________
JG-Webdesign |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Place something like:
html Syntax (Toggle Plain Text)
html Syntax (Toggle Plain Text)
|
|
|
|
|
|
#3 |
|
Professional Programmer
|
I know I can do that. However I am looking for a way to automatically add that link after every section describing a class. I hope this clears things up.
__________________
JG-Webdesign |
|
|
|
|
|
#4 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Oh, I see. I'd recommend first getting Prototype, which is a widely used javascript library that makes tasks like these so much easier. And then maybe something like:
javascript Syntax (Toggle Plain Text)
|
|
|
|
|
|
#5 |
|
Professional Programmer
|
I actually figured it out, but it was much messier than what you did. I think I will check out Prototype.
Thanks.
__________________
JG-Webdesign |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| disable 'backspace' key in Javascript. | pushkarajthorat | JavaScript and Client-Side Browser Scripting | 1 | Dec 26th, 2006 6:01 AM |
| Hidden unless Javascript enabled? | Writlaus | JavaScript and Client-Side Browser Scripting | 3 | Apr 25th, 2006 10:52 PM |
| Javascript alternative? | Writlaus | JavaScript and Client-Side Browser Scripting | 32 | Apr 21st, 2006 12:44 AM |
| HTML page not reading external Javascript file | aznluvsmc | JavaScript and Client-Side Browser Scripting | 9 | Nov 21st, 2005 9:17 PM |