Posts

UI practice #4 How to Check if At Least One Checkbox is Selected Using jQuery | jQuery Tutorial for Beginners

Image
How to check whether at least one input is selected using jQuery When building forms, it's often necessary to ensure that users make a selection before submitting. This is especially true for options like checkboxes, where users might need to choose at least one option. In this article, we'll show you how to easily check if a checkbox is selected using jQuery and how to prompt users to select at least one option before submission. For instance, consider developing a survey form where users need to select their preferred communication methods (Email, SMS, etc.). If none are selected, it's important to notify the user to make a selection before they can proceed. How to check that using jQuery When a select option is checked checked attribute is added. To check whether any of it is checked, :checked is used in jQuery. If any of the checkboxes have the checked attribute, then the user is allowed to submit. How to check whether an el...

jQuery Tutorial #2 - DOM functions and array

Image
Creating boxes with repeating background color - jQuery practice In this article, we’ll cover how to use jQuery , DOM methods , and JavaScript arrays to create interactive boxes with repeating background colors. You could try our previous practice exercise for hands on jquery knowledge. Jquery array i) When you get an input, check whether it is validated as a number. ii) Based on the input value, create a number of boxes. iii) Set all the boxes with background colors from an array. How to Get an Input Value from a Textbox var inputValue = $(this).val(); console.log(inputValue); Testing Whether the Input Value is a Number To test whether the input is a number, we use a regular expression pattern. if (/^[0-9]$/.test(inputValue)) { console.log("It is...

CSS Flexbox, AMP, and Bootstrap 4: Mastering the Foundations of Modern Web Development

Image
A Fantastic Year of Learning: Creative Technocrayts' 2018 Rewind Wow!! 2018 was a fantastic foundational year for us, Creative Technocrayts. The skills we mastered that year—like implementing **advanced CSS layout techniques (Flexbox)**, pioneering **Core Web Vitals concepts** via Google’s AMP, and streamlining UI design with **Font Awesome 5**—are still **critical for modern high-performance web development today.** We have discussed a lot, thanks to the constant support from the community. We have received both positive feedback and negative criticism as well. Keeping that in mind, we strive to improve and learn more and give back to the community. 2018 showed tremendous increasing readership from the Google+ community and Facebook page, apart from Twitter and LinkedIn, and we are so happy about that. Thank you guys :) It's time for us to look back at this awesome year, 2018!!! Daily UI ...

Daily UI practice #1 - Input range slider and populating value in script

Image
Daily UI practice Recently I had some time so checked for latest updates in design from awwwards.com I wanted to practice UI for the day. So I picked up a site from there. The reason I picked up that is i) I wanted to learn something new ii) I wanted to do something which I haven’t done before So the exercise was about, Creating a range slider and getting the value Added box-shadow to jumbotron component. Now placing input range elements inside the component, Following bootstrap 4 documentation I got the above screen as it looked like in bootstrap website. I can’t proceed further as I didn’t have any other elements to style. Then I read few tutorials from css-tricks.com What is Shadow DOM? Well, we all know that, when a HTML page is loaded in a browser DOM (Document Object Model) is created. Likewise browsers have capability to create sub tree to the already created DOM elements.   Now we have got two components and customize the styles. They are 1. Trac...

jQuery practice #3 - DOM manipulation

Image
jQuery is a Javascript framework. When do we use Javascript, jQuery, jQuery UI DOM Manipulation in jQuery What jQuery does? jQuery is a JavaScript library that can: Access parts of a page Modify the appearance of the page Alter the content of the page Respond to user interaction with the page Add animation to a page Manipulating DOM with jQuery methods 1. To insert new elements inside every matched element, use: .append() .appendTo() .prependTo() .prepend() Example for .prepend() in jQuery HTML: <div class="productsContent one-box"> <div class="box"> <h4> Loreum ipsum1</h4> <p> Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit... </p> </div> </div> Prepending an element using jQuery: $('.productsContent').prepend('November, 2018'); New DOM: $(...

How to solve browser compatibility issues in websites?

Image
Websites we develop should always ensure better user experience keep in my mind the tough competition in the market by contemporary players How to solve browser issues in website How our website or web applications looks in different browsers and in different platforms matters the most. We are seeing increase in range of browsers and we may not know from which browser users visit our site. Every browsers have their own way of being an ideal browsers and they have their own features. Making our functions and UI across all the browsers should follow certain guidelines. By ensuring browser compatibility in our SDLC, it would be a safe game to play instead of going about things in the final end. To solve common browser compatible inconsistencies, we are discussing few effective points here. Browser compatibility for modern browsers Keeping in mind, the cost and time constraints, making sure our websites work for Chrome, M...

CSS Flexbox justify-content Property: How to Use space-between, space-around, and space-evenly for Horizontal Alignment

Image
Flexbox CSS justify-content:space-* In modern web design, Flexbox has become one of the most powerful layout tools in CSS. The justify-content property plays a crucial role in aligning and distributing space between items within a container, especially in horizontal layouts. In this article, we'll explore how to use justify-content with various values like space-between, space-around, and space-evenly to achieve optimal alignment for your web designs. Flexbox CSS justify-content: space-* Flexbox layout and its properties are a set of properties which helps to align flex-items in a container. As we have discussed in detail in our previous articles: Flexbox is a set of properties. It helps to align grid elements in a container in many ways. It also helps to realign the way elements are arranged on mobile or responsive screens without writing too much code. What is justify-content in CSS Flexbox? The justify-content ...