Posts

Showing posts with the label CSS

jQuery and CSS Selectors Part-5

Image
Introduction Download In this post you are going to learn all about jQuery and CSS Selectors, if you are still not using jQuery in your web apps, this post will motivate you. Here I am going to talk on "Custom Selectors" and filter expression, let's first look at a problem that we will solve in this article. Problem Assume I have a blog/website and I want all external URLs to open on new browser tab. For example when you click on any external URL on Facebook, it opens URL on new tag. No meaning you have mentioned "target" attribute with URL or not, I always want external URLs to open on new tab. In addition with this, I also want to add an external icon with all external URLs. How to do this? Look at the image given below: I

jQuery and CSS Selectors Part-4

Image
Introduction Download In this post you are going to learn all about jQuery and CSS Selectors, if you are still not using jQuery in your web apps, this post will motivate you. Here I am going to talk on "Custom Selectors", let's first look at a problem that we will solve in this article. Problem 1 Look at the following table structure.             < p >                 < b > Table 1 goes here. </ b >             </ p >             < table >                 < tr >                     < td > Put your texts here. </ td >                 </ tr >                 < tr >                     < td > Put your texts here. </ td >                 </ tr >                 < tr >                     < td > Put your texts here. </ td >                 </ tr >                 < tr >                     < td > Put your t

jQuery and CSS Selectors Part-3

Image
Introduction Download In this post you are going to learn all about jQuery and CSS Selectors, if you are still not using jQuery in your web apps, this post will motivate you. Here I am going to talk on "Attribute Selectors", let's first look at a problem that we will solve in this article. Problem Suppose you have a web page (or website) and you want to apply the style to all links on web page (or website) in such a way that display styles as in below image for each type of links email url, pdf file download url and word file download url, differently: I have image, you can see two different pages, an html page and an ASP.NET page. I am an ASP.NET guy so I love to use this too. Now, to create such system we need to identify the URL Attributes (which containing email or pdf or word) and add the image with url text. So, we need to take the advantage of "Attribute Selectors"

jQuery and CSS Selectors Part-2

Image
Introduction In this part, you are going to learn robust feature of jQuery Selector. Look at this image, left side is its code and right side is its output. Above code is very simple, no any styles applied. Now, we want to achieve the following style by using jQuery and some CSS. How? You can see there are some challenges for developer, for example: (i) How will you access to each <li> element to apply icon? (ii) How will you apply background color for <ul>? Remember, any modification in above <body> is not acceptable, that's challenge. Okay, we have seen at the challenges so far, let's try to solve this. Follow the steps: Step 1 We need to create two CSS styles and we will call it 'newStyle' and 'newStyle1'. Find the CSS style code here:     < style type ="text/css">         .newStyle         {             margin : 20px ;             float : left ;             list-styl

jQuery and CSS Selectors Part-1

Image
Introduction This is my very first post on jQuery specific title; I have posted many articles using jQuery with ASP.NET within last few days. Now I'm wishing to explore jQuery from very basics, here comes my title 'jQuery CSS Selectors'. I'm not going to talk about definitions here, just going to show you something using examples. So, let's begin. Look at this table: Type of Selector In CSS In jQuery Details ID #name { } $('#name') It will select all controls/elements that have id = 'name'. Class .address { } $('.a

Popular posts from this blog

Migrating database from ASP.NET Identity to ASP.NET Core Identity

Customize User's Profile in ASP.NET Identity System

Lambda two tables and three tables inner join code samples