This is my first post of social code using the github repository at :
http://github.com/pixelhandler/jQuery-MenuTree-Plugin/
A JavaScript plugin based on jQuery library that builds an expandable/collapsable menu tree from a list element
-
Requires JavaScript library: jQuery
-
Developed using jQuery version 1.4 … Plugin page
-
Demo of the plugin behavior showing both lists and definition list… Demo
-
Status : New plugin, give it a try!
-
Tracer plugin added and featured with demo.
-
Blog post for MenuTree plugin on my blog… Blog
How to build a menu tree that is expandable with jQuery
Your html will need to link to the jQuery plugin in the head element
Your html markup needs to use a list like…
Definition list - Term 1
Description not targeted,
uses CSS classes to collapse/expanded view
Term 2
Description 2 with links listed
- Pixelhandler
- jQuery
Term 3
Description 4
Term 4
Description 4 with unordered list
menuTree plugin plugin uses a few CSS classes for visual design…
#myTree .menuTree:before {
content: "[+] ";
}
#myTree .expanded:before {
content: "[-] ";
}
#myTree .collapsed {
display: none;
}
At the end of your html markup, before the closing body element use a script to setup the function…
$(document).ready(function() {
$('#myTree').menuTree({
animation: true,
handler: 'slideToggle',
hrefBegins: '#',
trace: true
});
});
This plugin has default options which you may override. The animation option may use jQuery toggle or slideToggle methods, or just use the default css option to show/hide the child list(s).
When called with the animation: true option the plugin uses the handler option to select slideToggle or toggle method to add effects to the display of child menu(s). You may set the speed as you please, e.g. speed: ’slow’. Also, you may indicate what the child menu(s) are marked up with, e.g. listElement: ‘ol’ instead of the default listElement: ‘ul’
The default options:
$.fn.menuTree.defaults = {
// setup animation
animation: false,
handler: 'css',
speed: 'fast',
// setup hooks in markup
listElement: 'ul',
hrefBegins: '#',
// uses 'tracer' plugin
trace: false
};
If you have any questions, please feel free to ask them on the jQuery
meetup site, found here:
http://meetups.jquery.com/group/jquerylosangeles
Posted: January 28th, 2010
Categories:
Social,
development
Tags:
Comments:
No Comments.
This year I set a goal to learn Adobe Flex 3. I have found the help of other professionals and the OCFlex.org user group. Besides the Flex Video Training, I found that the best source of understanding ActionScript using the MXML library is by reading and coding the examples in the book “First Steps in Flex”. To keep myself accountable to this goal, I agreed to train my cousin in learning Flex programming; is who is on the road to becoming a web developer. It turns out that my cousin’s friend is a top-notch programmer and loves the Flash platform. He challenged us to just start building a simple application, a calculator. So, this is our first iteration of a calculator programmed with Flex 3:
Posted: November 15th, 2009
Categories:
development
Tags:
ActionScript,
Flex,
programming
Comments:
No Comments.
“Learning Rails has been an awesome way to learn about programming; using the ‘Rails’ framework and opinions helped me to learn best practices and object oriented programming concepts.”
How I did it: I bought Simply Rails 2 and coded the example digg like site, ’shovel’. Then got very excited about rails and bought the Agile Web Development with Rails book; and built the example store application. Since I’m a huge fan of twitter I built my own short URL site for tracking clicks on the links I post all around the web – rant.cc . Starting to feel confident, I build out a new site in the agile style called prayerlife.net the concepts are similar twitter and 43things. This time I was working without a tutorial but referencing the Agile book and searching the web and google group Ruby on Rails: Talk for help along the way. I also tune in to podcasts: Railscast, Rubyology, and Learning Rails. In addition, I participate in a local usergroup, OCRuby.com, where I can ask questions and learn from others in realtime. At a meeting I learned from a presentation on using the console while demonstating ‘Active Record’; this helped me to catch the key concepts of data models.
Lessons & tips: The best way to learn is to… just build it. Get in touch with others who are learning as well. Also, connect with those who have programming experience. The podcasts are are great way to get past concepts that seem difficult.
Resources: Podcast: Railscast, Rubyology, and Learning Rails
Books: Simply Rails 2, Agile Web Development with Rails
Usergroup: OCRuby.com
Posted: June 28th, 2009
Categories:
development
Tags:
programming,
ruby on rails
Comments:
No Comments.