text:
Q: Avoid closing Bootstrap Modal when specific button inside is clicked I implemented a modal with a form inside with 5 buttons: Submit, 2 Close buttons, and 2 more for an input number spinner that allows the user to select a quantity using "+" and "-" buttons. The problem is that every time the "+" or "-" button are clicked, the modal is closed, which is a normal behavior for modals when pressing submit or close buttons but I need the modal to stay visible and allow the user to select the quantity without the modal been closed.
This are the buttons inside the form that control the number spinner:

            <button class="btn btn-default" id="spin1" data-dir="dwn">-</button>

        <input type="text" class="form-control text-center" name="quantity" value="1">

            <button class="btn btn-default" id="spin2" data-dir="up">+</button>

And this is the function that control the input spinner:

if I use the e.preventDefault() (associated to ID's for the buttons for this purpose: spin1 and spin2) to avoid the modal to be closed, the modal stays visible but the spinner doesn't not update the quantity input with the new value, and he form sends the default value of 1 to the server to be processed. Any guidance is appreciated. Thanks.

A: When you tried e.preventDefault(), did you pass the event to the function?
If not check the console, there must be an error saying that 'e' is undefined.
So just pass 'e'(the event), then it should work.
$(document).on('click', '.number-spinner button', function (e) {
        e.preventDefault();
        var btn = $(this),
        oldValue = btn.closest('.number-spinner').find('input').val().trim(),
        newVal = 0;
        if (btn.attr('data-dir') == 'up') {
            newVal = parseInt(oldValue) + 1;
        } else {
            if (oldValue > 1) {
                newVal = parseInt(oldValue) - 1;
            } else {
                newVal = 1;
            }
        }
        btn.closest('.number-spinner').find('input').val(newVal);
    });

A: I think the best solution will be adding  tag with the button style.


Course Description: The two-day introductory segment is a comprehensive yet selective exploration of the key features and functions of the powerful Access products. You will learn the crucial configuration steps and design techniques that make it possible to create robust, full-featured database applications without any programming. The major components in Access have dozens and sometimes even hundreds of options for the way they can be used. This course does not attempt to cover everything, rather, it concentrates on the features and functions that will make the most effective use of your time and efforts.
Course Description: The two-day intermediate segment is intended for those already familiar with basic Access operations and are ready to make the transition from Access user to application developer. You will learn how to directly control and manipulate Access from behind the scenes to create queries, data entry forms and reports that function precisely in the manner you require. Access is far more powerful and flexible than it might initially appear, making Access suitable for every kind of database application.
Course Description: The one-day advanced segment is an absolutely intense day intended for experienced Access developers who want to fine-tune their applications to exploit the many powerful features and functions built into Access. Access applications have numerous options for dealing with multiple users: different forms of security, concurrency and isolation can be combined to solve any conceivable design problem. Access can be extended by incorporating server-based data sources, ActiveX controls and servers into your applications.
Course Description: This is a five-day course with in-depth chapters being organized to solidify the students' learning experience. The labs are long for great "hands-on" learning.
This course presents all the essential tools, libraries, components and best practices that today's Web developers must utilize while building leading-edge ASP.NET Web applications. It begins by explaining the different Web application architectures and project types supported by Visual Studio 2010. Next, it introduces the different types of Web controls that are at the developers' disposal. It also demonstrates the power of creating custom Web controls. User controls and master pages demonstrate the power of code reuse while the site navigation controls can be used to simplify navigation for the Web users. A thorough explanation of data binding is covered using the latest Web data controls. Students also learn about the ASP.NET provider model introduced with .NET 2.0 and newer. Web Parts are also extensively covered for use on ASP.NET and SharePoint Web sites. Today's Web security risks are explained and AJAX and jQuery are covered to offer a Web 2.0 user experience. Often overlooked in other courses, the different methods of ASP.NET Web deployment are also explained. The course wraps up with an introduction to Silverlight programming, which is Microsoft's answer to Adobe's Flash technology.course presents all the essential tools, libraries, components and best practices that today's Web developers must utilize while building leading-edge ASP.NET Web applications. It begins by explaining the different Web application architectures and project types supported by Visual Studio 2010. Next, it introduces the different types of Web controls that are at the developers' disposal. It also demonstrates the power of creating custom Web controls. User controls and master pages demonstrate the power of code reuse while the site navigation controls can be used to simplify navigation for the Web users. A thorough explanation of data binding is covered using the latest Web data controls. Students also learn about the ASP.NET provider model introduced with .NET 2.0 and newer. Web Parts are also extensively covered for use on ASP.NET and SharePoint Web sites. Today's Web security risks are explained and AJAX and jQuery are covered to offer a Web 2.0 user experience. Often overlooked in other courses, the different methods of ASP.NET Web deployment are also explained. The course wraps up with an introduction to Silverlight programming, which is the Microsoft answer to Adobe Flash technology.
Course Description: The Java language began modestly as a programming language to address the needs of a diverse set of consumer appliances, but has since evolved to become the most popular language and platform for building enterprise level applications. Intertech Training's Complete Java course teaches you the syntax and core APIs of the Java programming language while also coaching you on the conventions and practical techniques necessary to code Java professionally. Note: this class is based on Java 8. The class begins by describing the core syntax of the Java language while also exposing students to object-oriented programming concepts. After establishing this essential foundation, the class then covers other crucial topics like exception handling, packaging, and when to use arrays versus collections.
Course Description: Complete Java Web Development is a crash course in developing cutting edge Web applications using the latest Java EE 6 technologies from Oracle and the open source community. The course builds a strong understanding of Servlet technology as the cornerstone of the Java Web platform. It shows how JSPs build on the Servlet architecture. Additionally, the class will show you how to use JSTL, custom tags and JSP expression language to reduce Java code in Web pages while adding tremendous power and capability to those pages. The class culminates in an exploration of Java MVC frameworks and compares some of the more popular offerings like Struts and Spring MVC. While focusing on Web technologies, the course also exposes developers to the constant trade off between application robustness and complexity. This is not a class that focuses on theory. Participants will find the course is loaded with practical labs and simulations. After taking this class, your developers will be able to build Web applications faster, that are more scalable, and that are easier to maintain.
Course Description: The two-day introductory course is a detailed roadmap to successfully managing projects using Microsoft Project. You will learn the key elements of project management and how to apply that knowledge using the robust features of Microsoft Project. You will learn to schedule, baseline, manage, and complete a project using the features of Microsoft Project. Exercises reinforce your learning and there is time allotted for you to work on your own projects. This course does not attempt a comprehensive look at all of the hundreds of features but concentrates on examples of each feature set to set the course for Getting the Job Done with Microsoft Project.
Course Description: The one-day advanced course is intended for those already successfully using Microsoft Project to manage individual projects that now need to use some advanced techniques. You will learn the key elements of multiple project management using shared resources and how to apply that knowledge using the robust features of Microsoft Project. You will learn to create a resource pool contour resources use formulas in cells, link tasks across projects and more. Exercises reinforce your learning and there is time allotted for you to work on your own projects.
Course Description: Data is everywhere. Whether you are at the grocery store, office, laboratory, classroom, or ballpark, you are awash in data: prices, schedules, performance measures, lab results, recipes, contact information, quality metrics, market indices, grades, and statistics. Most job roles today involve some form of data management. In the case of data workers, it may be their primary job task. For some, like research scientists and accountants, data management may be a strong component of the job. And for others, such as sales clerks or those in the skilled trades, data management may consist of an incidental job responsibility such as time reporting or recording a sale. But virtually everyone is affected in some way by the need to manage data. A relational database application such as Microsoft® Office Access® 2013 can help you and your organization collect and manage large amounts of data. Access is a versatile tool. You can use it as a personal data management tool (for your use alone), or you can use it as a construction set to develop applications for an entire department or organization. In this course, you will learn how to use Access 2013 to manage your data, including creating a new database; constructing tables; designing forms and reports; and creating queries to join, filter, and sort data. You can also use this course to prepare for the Microsoft Office Specialist (MOS) Certification exam for Microsoft Access 2013.
Course Description: Your training and experience using Microsoft® Access® 2013 has given you basic database management skills such as creating tables, designing forms and reports, and building queries. In this course, you will expand your knowledge of relational database design, write advanced queries, structure existing data, share data across applications, and customize reports. Extending your knowledge of Microsoft Access 2013 will result in a robust, functional database for your users. You can also use this course to prepare for the Microsoft Office Specialist (MOS) Certification exams for Microsoft Access 2013.
Course Description: You have covered many of the basic functions of Microsoft® Office Access® and now you are ready to learn advanced Access features such as, database management, advanced form design, packaging a database, encrypting a database, preparing a database for multi-user access and more. Knowledge of these features separate database professionals from the casual database users or occasional designers. The training today added to that which you have gained from the previous two days and will round out your Access education and provide you with marketable job skills. You can also use the course to prepare for the Microsoft Office Specialist (MOS) Certification exams for Microsoft Access 2013.
Course Description: Part 1 - A relational database application such as Microsoft® Office Access® 2013 can help you and your organization collect and manage large amounts of data. Access is a versatile tool. You can use it as a personal data management tool (for your use alone), or you can use it as a construction set to develop applications for an entire department or organization. In this course, you will learn how to use Access 2013 to manage your data, including creating a new database; constructing tables; designing forms and reports; and creating queries to join, filter, and sort data. Part 2 - Your training and experience using Microsoft® Access® 2013 has given you basic database management skills such as creating tables, designing forms and reports, and building queries. In this course, you will expand your knowledge of relational database design, write advanced queries, structure existing data, share data across applications, and customize reports. Extending your knowledge of Microsoft Access 2013 will result in a robust, functional database for your users. Part 3 - You have covered many of the basic functions of Microsoft® Office Access® and now you are ready to learn advanced Access features such as, database management, advanced form design, packaging a database, encrypting a database, preparing a database for multi-user access and more. Knowledge of these features separate database professionals from the casual database users or occasional designers. The training today added to that which you have gained from the previous two days round out your Access education and provide you with marketable job skills. You can use all of these courses to prepare for the Microsoft Office Specialist (MOS) Certification exams for Microsoft Access 2013.
Course Description: Complete Hibernate and JPA course teaches students the Java specification for persisting objects to the database. It does so through Hibernate - the most popular JPA implementation and object-relational mapping framework for Java environments. Object relational mapping in large enterprise applications is difficult. The task is so difficult that the problem of storing and retrieving objects to a relational database has its own name - impedance mismatch. In this class, students learn object-relational mapping concepts and the various issues and options available in Java to address object persistence. With these fundamentals, the course then explores the basics of JPA/Hibernate object persistence and configuration. It also digs into the details of mapping, queries, transactions, and concurrency. Not just a class that focuses on theory, this course is loaded with practical labs and deals with maintenance and performance issues. After taking this class, developers will be able to build faster, more flexible and easier to maintain application persistence layers and overcome impedance mismatch with JPA implementations like the Hibernate framework.
Course Description: ASP.NET MVC 5 is Microsoft's last MVC release based on both the .NET Framework or .NET Core 1.0 for building scalable, standards-based web applications using well-established design patterns and the power of ASP.NET and the .NET Framework. Version 5 of ASP.NET MVC adds many new features such as template-based views based on on the Bootstrap framework, attribute routing, support for Entity Framework 6, and more.
This 5-day course spends Day 1 covering advanced C# and .NET framework topics most commonly used with ASP.NET MVC 5 including delegates, lambdas, anonymous objects, dynamic objects, LINQ, and much more. The remaining four days introduce and educate students on all the necessary ASP.NET MVC 5 skills needed to design and build well-architected web applications.
Note that Days 5 wraps up with a chapter and lab that introduces .NET Core, ASP.NET Core 1.0, MVC Core 1.0, and much more.
During the course, attendees build a fully functional data-driven ASP.NET MVC web application through a series of hands-on lab exercises.
Course Description: This training course teaches developers the programming skills that are required for developers to create Windows applications using the C# language. During their five days in the classroom students review the basics of C# program structure, language syntax, and implementation details, and then consolidate their knowledge throughout the week as they build an application that incorporates several features of the .NET Framework 4.5. The course introduces many of the techniques and technologies employed by modern desktop and enterprise applications, including: Building new data types. Handling events. Programming the user interface. Accessing a database. Using remote data. Performing operations asynchronously. Integrating with unmanaged code. Creating custom attributes. Encrypting and decrypting data. At the end of the course, students should leave the class with a solid knowledge of C# and how to use it to develop .NET Framework 4.5 applications. This course uses Visual Studio 2012, running on Windows 8.


incorporating technology into public spaces seems to be the latest and greatest in design. the digital facade of the Plaza de las Letras is so beautiful. i could sit on the bench and watch it all day. read more about it here at archdaily.
i love this interior of mono's office over at atelier a + d (one of my favorite blogs!) the office was designed by lazor office. doesn't this look like a fantastic place to work?
i saw this beautiful diy polaroid wreath yesterday on apartment therapy and fell in love. this might actually make me hang a wreath this year. well, this wreath and the diy magazine wreath both are actually cool.
In the Jan van Lieshoutstraat in Eindhoven (NL) - a mainly pedestrian street adjacent to a shopping mall - BYTR suggested that public space be cleared of lampposts and small planters, which were forming obstacles. The design - called the GREENSPOTLIGHT - combines these two elements, greenery and street lighting, into one integrated design: a special green public light where living plants form the shade. In the bottom of the shade, a ring of integrated planters are situated. The lights are hung from cables between the street walls. This low-key intervention raised the quality of the street from a back alley to a shopping street.
we're having a feliz navidad office christmas party this year. i went out to urban outfitters at lunch to get my dirty santa (under $20) gift and this is what i came back with...a $10 book filled with dirty spanish terms and mustache bandages. i couldn't stop laughing. i secretly want to steal them back to keep for myself. is that bad?
how would you like to live in a completely recyclable home? i would! this beautiful four-story home by werner sobek is just that. it is put together by mortise and tenon joints, powered by solar panels, produces no emissions, and is self sufficient for heat. plus, it's amazing and gorgeous and has an outstanding view.
since it's furniture morning on peppermags i thought this oh my lovely chair necklace by sisply was suiting.
i think this boden chair from room and board would be a nice addition to my living room. hint hint. yes, i'd also like it just like the picture above but in a faux leather.
have you ever tried installing crown molding? i have two bedrooms in my house that i'd like to add insullation and sheetrock in and would have to replace the wood trim and crown molding. while searching for diy projects to post, i came across this great step by step tutorial on crown via popular mechanics.