Topics on Web Design and Development, Coding with Web Standards, JavaScript, Ruby on Rails, Search, Internet Marketing and Other Strategies on Doing Business Online

Category Archives: Development

Web Developement

16 code solutions to kick-off dev blog: html-src.com

Today I created a new blog for storing my code solutions, snippets and examples. I’m planning on using this site to post on the specific topic of front-end web development with HTML, CSS, and JavaScript. I will likely focus forward thinking topics on HTML5 CSS3, etc. also on developing on a mac.

It all ends with HTML source, whatever happens on the server-side or gets modified on the client-side with AJAX or a script. So my web dev blog html-src.com is short for HTML source, and is all about coding.

16 articles to kick it off …

  1. Apache directive to combine .js and .css files
  2. Boilerplate code for jQuery plugin with debug and logging methods
  3. Clean up directories prior to initializing repository
  4. Command line tip to find running apps and kill ‘em
  5. Fancy up a list of articles into a dynamic rotation of text
  6. Fix bad characters † after mysqldump and import utf-8
  7. Hijack form’s submit onclick, validate, and use enter key to post form
  8. Images loaded or not? Check with JavaScript
  9. Import a URL with Ruby
  10. Insert facebook like button with current page’s URL
  11. Ruby block to create random token string without offending
  12. Target specific browsers with css class on body element
  13. Text in WordPress search input fields
  14. Use mysql on the command line when developing with MAMP
  15. Use proxy file with PHP to load a URL from remote domain
  16. Use ruby gem, Sass to generate a CSS grid layout

So check it out http://html-src.com.

Posted in Development | Tagged , , , | 1 Comment

jQuery MenuTree Plugin hosted at github.com

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
  1. Pixelhandler
  2. jQuery
Term 3
Description 4
Term 4
Description 4 with unordered list
  • One
  • Two

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',
		anchor: 'a[href="#"]',
		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',
	anchor: 'a[href="#"]',
	// 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

Also posted in Social | 1 Comment

Learning Flex by building a Calculator

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:




Get Adobe Flash player

Posted in Development | Tagged , , | Leave a comment

How to learn more about Ruby on Rails

“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 in Development | Tagged , | Leave a comment