Postingan

Menampilkan postingan dengan label How to examples

How to use jQuery Class and Id Selector to find DOM elements

Gambar
One of the best things about jQuery is there selectors, which gives the jQuery enormous power to find and select DOM elements so easily. If you are coming from JavaScript background then you might love those classical methods to find DOM elements like getElementById() and getElementByName(). They have served very well in the old days of JavaScript coding,  but once you start using jQuery selector, which is quite similar to CSS selector, I am sure you will forget them. Searching and finding HTML elements using jQuery selectors are natural, intuitive and super easy and that's why I love them. One of the first things to know about Id and Class selector is that ID selector always returns one element because browser doesn't allow duplicate ID and two HTML element can't have the same ID, which means if you just need to find just one element in DOM tree than best selector is ID selector. The jQuery Id selector is also the fastest way to find elements in jQuery. Now, if you need ...

Spring Hello World Example in Java using Dependency Injection and XML Configuration

Gambar
Hello All, In this Spring framework tutorial, you will learn how to write the hello world example in the Spring framework. This should be your first tutorial to start learning Spring framework, as it gets the ball rolling. While coding and running this example, you learn a lot about Spring framework, Spring XSD files, necessary JAR files, and more importantly how Spring framework works. This HelloWorld program in Spring framework is an extension of the classical Java hello world program, which you might have seen earlier. This program is written using the Dependency Injection design pattern by using the Spring Framework's IOC container.  Even though now you can configure Spring dependency using annotations and Java configuration, this example uses a traditional XML way to configure dependencies. This is important to learn because there are many Spring-based Java projects, which are already live in production and still using XML configuration. If you have to maintain ...