oubaka / jqfundamentals-1

Code repository for jQuery Fundamentals training
0 stars 0 forks source link

6.1 Load External Content #7

Open oubaka opened 8 years ago

oubaka commented 8 years ago

https://github.com/oubaka/jqfundamentals-1/blob/master/exercises/js/load.js

Open the file /exercises/index.html in your browser. Use the file /exercises/js/load.js. Your task is to load the content of a blog item when a user clicks on the title of the item. Create a target div after the headline for each blog post and store a reference to it on the headline element using $.fn.data. Bind a click event to the headline that will use the $.fn.load method to load the appropriate content from /exercises/data/blog.html into the target div. Don't forget to prevent the default action of the click event.

segunadeleye commented 8 years ago
oubaka commented 8 years ago

Refactored as adviced