Use jQuery selectors to locate and select elements on the page. jQuery selectors operate much like CSS3 seletors. Start out simple by selecting elements by tag, DOM id, or class name. Then get more advanced and select form elements based on their current state, and complex n-th child selectors. Additional notes: As a result of Drupal 7 using jQuery in no conflict mode, the jQuery object is not automatically assigned to the global $ symbol. The easiest way to get around this in Firebug or Webkit Inspector is to just use jQuery('element'); or do $ = jQuery; and then use the $ as per usual. If you take a look at the JS files in Drupal 7 you'll see that they almost all use an anonymous closure in order to assign the $ variable. Something like the following. (function ($) { // Add your code here and use $ as per usual. })(jQuery);
First look at basic fundamentals of jQuery's syntax and usage. Learn about using the $ function, jQuery selectors for finding elements on the page, creating new DOM elements, and browser detection. In addition to selecting elements on the page we'll introduce the basics of jQuery effects and events. Note: In D7 developers are encouraged to add a jQuery wrapper around JavaScript. (function ($) { // Original JavaScript code. })(jQuery);
When using Firebug console you need to use jQuery instead of $. >>> jQuery('.title')
Drupal 7 uses jQuery in no-conflict mode meaning you need to wrap your code in an anonymous function and pass the jQuery object into the function. This is a pretty common practice now days and is actually a better way to write jQuery in general rather than always assuming that jQuery is the $ symbol. But, it means in the console you need to use either jQuery('selector) or $ = jQuery;
What Is jQuery?
FreejQuery makes using Javascript easy. A description of the basic jQuery library, and a brief history of why jQuery exists and how it can be used to simplify development of Javascript for your site.
Use the jQuery plugin system to extend the set of methods available in jQuery beyond those provided by the core jQuery library. See where to find jQuery plugins, and examine a number of the available plugins and when to use them and what to use them for. See how to make use of plugins in your custom jQuery code. Finally, learn how to write your own plugins to extend the basic jQuery functionality.
A brief summary of the material covered in the Introduction to jQuery video series
Overview the Firebug extension for Firefox and how it can be used to aid in the development of Javascript. Real time development and debugging of Javascript.
Learn about using jQuery to apply animation and effects to DOM elements. Show and hide things on the page using the fade, slide, and hide/show methods. Chain multiple effects together to create animations. And use the jQuery .animate() function to preform more complex animations.
Learn how to respond to the actions that a user performs on a page using jQuery events. Attach event handlers to DOM elements and respond to mouse events like click and hover, and keyboard events such as someone pressing or releasing a key. Finally learn about responding to special events that only occur on form elements. This chapter gives a description of each of the available jQuery events and how or when they are triggered. Check out http://quirksmode.org/js/keys.html for more information on compatibility for assigning keyboard events across multiple browsers.
Add a jQuery Javascript file to Drupal following best practice methods for including javascript files on the page. Learn about how your custom jQuery scripts are loaded on to the page, and when they get executed. Introduces jQuery's no-conflict mode and provides some best practice examples for writing your own jQuery files within the context of Drupal as a whole.
Note: To avoid hiding all blocks on your page, target your blocks more specifically. For example, #sidebar .block .content
Also, inspect your markup for the existence of a class of title on the h3, which may or may not be applied in your theme. The new example below does not include the title class.
(function($){ $(document).ready(function(){ $('#sidebar .block .content').hide(); $('#sidebar .block h3').css('cursor', 'pointer').click(function(){ $(this).parent().children('.content').slideToggle(); }); }); })(jQuery);
Use jQuery to manipulate DOM elements including adding and removing classes to an HTML element, changing the content of an element, wrap a set of elements with a new element, adding new elements to the page using prepend and append methods and the related prependTo and appendTo methods. Use jQuery to manipulate properties height, width, and position of any DOM element. Finally learn how to use jQuery to completely remove selected DOM elements from the page.
Traverse the DOM tree using jQuery to find the children, parents, and other nearby elements of any selected element on the page. Learn how to select an element up the page and reliably locate it's siblings by traversing up the DOM to a parent element and then back down using find. Use additional jQuery methods to filter a list of DOM elements down using find to apply an additional selector to the list, not to filter out elements that do not match a set of criteria and more.
Welcome to a special series on Project Management from Drupalize.Me. This series differs from our usual format of screencasts and presentations. We interviewed Lullabot's technical project managers, the Chief Operating Officer, and the Account Director, and organized the footage into a series of lessons on topics that project managers (PMs) deal with on a regular basis, including contracts, communication, estimation, tools and methodologies.
Here's what we'll be covering in this Introduction to Project Management series:
- Project Management Methodologies: Learn about terminology and methodologies used in the world of software project management and how combining methodologies from different traditions can work effectively on service projects.
- Tools for Managing Projects: Learn about the kinds of tools that are used in software project management for tracking progress, reporting, and team and client communication.
- Traits of a Project Manager: What makes a great project manager? What characteristics, skills, and approaches are great to have in someone in the role technical project manager?
- Types of Services Contracts: Learn about the different types of services contracts; in particular, the three that Lullabot uses in their client engagements. As you will see, the type of contract can have different implications in a project manager's needed skills and approach.
- Estimation on Drupal Projects: Learn about the challenges of estimation, and insights into the what estimates should communicate and how they should illuminate the various degrees of risk and uncertainty in a project.
- Resourcing and Scheduling: Learn about the challenge of determining how many people are needed for a project, and what questions to ask when determining capacity.
- Putting Together Teams: Learn strategies for how to put together teams, especially for large projects.
- Being Human on Projects: Learn about the people skills that are important to have, ways to detect burnout, and how to help team members get back on track.
- Client Communication: Learn about the many facets of client communication.
- Managing Expectations: Learn strategies for aligning and managing client expectations from the perspective of sales and account management.
- Project Kick-Off Essentials: Learn about the essential elements of a successful project kick-off meeting.
- Problems, Risks, and Red Flags: Learn strategies for identifying and dealing with problems, risks, and red flags on a project.
- Quality Assurance (QA): Learn about the various kinds of QA that you can implement in your project.
- Demos and Retrospectives: Learn about demos and retrospectives, some things to consider in a prototyping process, and what you can learn from these activities.
- Launch and Celebration: Learn some tips for ensuring a successful launch and the importance of celebrating the accomplishments of the team.
Whether you are a developer-turned-project-manager or a seasoned veteran, we think you will find insight into the art and science of project management in this series.
In this lesson, you’ll learn about methodologies and techniques that are often used in project management. These methodologies provide a set of processes for a development team to utilize, and a framework that a project manager can use to structure a project’s tasks and progress. You’ll hear from project managers at Lullabot who explain terms such as Waterfall, Agile, Wagile or Consultancy Scrum, Kanban, Scrum, and Sprints and how a tailored combination of these techniques often leads to the best results.
Additional resources
In this lesson, we’ll hear from Lullabot project managers about what they think makes a good ticket tracking system, some helpful ways to organize tickets, and other features including tracking conversations, email notifications, and reporting features that many ticket software platforms can provide. We’ll also hear about a tool called a Gantt chart which can help a project manager answer questions such as “when the project will be finished”, “what the critical path is”, and “what are the dependencies in this project?”
Additional resources
- Gantt Charts (SmartSheet)
- Burn down chart
- zenhub.io for GitHub
- Agile for JIRA
- Trello.com (standalone w/some integrations)
- JIRA: Agile plugin has a nice tool for planning sprints
- GitHub: use Milestones
In this lesson, you’ll hear from Lullabot’s Chief of Operations, Account Director, and several technical project managers about what they think makes a good project manager. These traits of a good PM include: being a great communicator, having the ability to distill a project into tasks, taking initiative to clear blockers for developers, probing stakeholders for requirements, assumptions, and other vital information, demonstrating leadership, and finally being able to have difficult conversations with clients—discussing uncomfortable truths with tact and diplomacy. Are you on the path to becoming a project manager? Or maybe you’re looking to improve your skills? With these insights, learn about the variety of technical and people skills that make for a great project manager.
Additional resources
Want to dive deeper? Here are some books recommended by project managers at Lullabot:
- Peopleware: Productive Projects and Teams by Tom DeMarco & Timothy Lister
- Making Things Happen: Mastering Project Management by Scott Berkun
- Tribal Leadership: Leveraging Natural Groups to Build a Thriving Organization by Dave Logan, John King & Halee Fischer-Wright
- User Stories Applied: for Agile Software Development by Mike Cohn
- Analysis without Paralysis: 12 Tools to Make Better Strategic Decisions by Babette E Bensoussan & Craig S Fleisher
- Software Estimation by Steve McConnell
- The Mythical Man-Month: Essays on Software Engineering by Frederick P. Brooks, Jr.
In this lesson, you’ll learn about three types of services contracts: the fixed bid or fixed scope, time and materials, and a retainer-based contract. You’ll also hear about the Iron Triangle: budget, scope, and timeline, and how these elements are controlled or can flex in these different types of agreements. Finally, you’ll learn about how a contract can imply a certain level of trust and how building successful relationships with clients can lead to future, more mutually favorable agreements.
Additional resources
In this lesson, you’ll learn what makes a good estimate and what some good questions are to ask in the estimation process. You’ll also hear about how an estimation process can detect unclear requirements and what kind of communication needs to happen as a result of that discovery. Finally you’ll learn some helpful techniques for estimation that provide just the right amount of detail.
Additional resources
Want to dive deeper? Here are some books recommended by project managers at Lullabot:
Books
- Peopleware: Productive Projects and Teams by Tom DeMarco & Timothy Lister
- Making Things Happen: Mastering Project Management by Scott Berkun
- Tribal Leadership: Leveraging Natural Groups to Build a Thriving Organization by Dave Logan, John King & Halee Fischer-Wright
- User Stories Applied: for Agile Software Development by Mike Cohn
- Analysis without Paralysis: 12 Tools to Make Better Strategic Decisions by Babette E Bensoussan & Craig S Fleisher
- Software Estimation by Steve McConnell
- The Mythical Man-Month: Essays on Software Engineering by Frederick P. Brooks, Jr.
Online Resources
- Systems development life cycle
- Scrum Breakfast (blog)
- Agile Software Development .com
- Certifications in Scrum
- Software Effort Estimation Considered Harmful
and on the opposite spectrum: How to Estimate
Templates
Articles by Lullabots
- Building a Development Matrix by Jerad Bitner
- The Art of Estimation by Seth Brown
- An Update on the Art of Estimation by Jerad Bitner
Methods
In this lesson, you’ll learn about the challenge of determining how many people are needed for a project, what questions to ask when determining capacity, and finally signals that may indicate that it’s time to bring others in or remove team members from a project.
Additional resources
The Mythical Man-Month: Essays on Software Engineering by Frederick P. Brooks, Jr.
In this lesson, you’ll learn some strategies for how to put together teams, especially for large projects. You’ll hear about the advantages of organizing a project into work streams, what that means, and how it can be advantageous to break up a large project team into smaller, more efficient groups.
In this lesson, you’ll learn about the human side of project managing; what people skills are important to have, and ways to detect burnout and help team members get back on track.