A JQuery selection question

Hi all:

Not sure this is a right place to ask the question:

How could use JQuery to select the <div> containing the text - "v.s." and "win"?

Thank you ^^.


Take nothing on looks; take everything on evidence.
- Charles Dickens
5/4/2009 9:37:11 AM
asp.net.client-side 24353 articles. 1 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 27

5/4/2009 9:57:59 AM



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  <script src="http://code.jquery.com/jquery-latest.js"></script>
    $("input[name='newsletter']").next().text(" is newsletter");
    <input type="radio" name="newsletter" value="Hot Fuzz" />
    <input type="radio" name="newsletters" value="Cold Fusion" />
    <input type="radio" name="accept" value="Evil Plans" />



Check the above link..

Hope it helps

Avinash Tiwari

Remember to click “Mark as Answer” on the post, if it helps you.
5/4/2009 10:05:13 AM

 Hi aliasncnu,

:contains is case sensitive function. So, you have to make use of your own function. Check the sample below.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Check Values</title>
<script type="text/javascript" src="jquery.js"></script>
<form id="form1" runat="server">
<div id="divTest1">asp.net</div>
<div id="divTest2">v.s. win</div>
<a href="javascript:;" onclick="check();">Test</a>
<script type="text/javascript">
function check()
$("div").each( function() {
if ($(this).html().toUpperCase().indexOf('v.s.'.toUpperCase()) >= 0 && $(this).html().toUpperCase().indexOf('win'.toUpperCase()) >= 0)
Please mark as Answer if it helps u. Thanks!

Parth Patel
Techsture Technologies
Software Developer
5/4/2009 11:43:19 AM

Similar Artilces:

Validation Controls in .NET ( Client side or server side?)
 i have a very basic question. We have all these validation controls in asp.net ( required field, range validator and others)..my question is the required field validator is a server side control. So does that mean that it does a post back?..is it client side or server side control  The only controls that post back are buttons and other inputs where you set AutoPostback="True", such as a dropdownlist or a textbox.  Another way of posting back is using an UpdatePanel and placing a trigger in it for a specified control and/or event. All controls are considered clien...

Jscript, moving from client-side to server-side (.NET)
Hey all I’m working translating a web-app written in client-side Jscript to run on the server-side as JScript.NET. Without needing to get too specific, I am using Jscript because the original page aggregated raw data to produce statistical results (this was done dynamically based on user 'sort-by' options). The final output is an html report that can be emailed. Because this is currently being done on the client side, as the raw data grows the load-time grows as well (to the point that has almost become unusable). I’m posting here to see if anyone has any experi...

When to use client side varidation and server side varidation in .net?
In .net or classic web application we can varidate user data either on client isde or server side. How to select which side varidate to be used? Thanks! Generally, I use both client and server validation. I make sure the input is in the correct format and reasonably valid on the client, then I verify the data on the server. The extent of validation also depends on the type of data that I need to validate.Here are a few references:Validating ASP.NET Server ControlsIntroduction to Validating User Input in Web FormsClient-Side Validation for ASP.NET Server ControlsSecurity Checklist...

communication between client side(java script) and server side in .net project
I have a question which is, when building a .net project, we are able to use server side code and client side code(java script). How do they communicate? Thanks Client Side coding works with the WebBrowser. So when ever you write client side code you have to keep browser compatability in your mind and you have to code. Server Side code works with Web Server (IIS) and it's ASPNET ISAPI's. The won't directly communicate with each other. But using AJAX you can all server side code from Client Side! Example article on Ajax@ http://www.devarticles.com/index2.php?option=content&task=...

client-side and server-side validation reducing post-backs question
For my page I was using server-side validation. In order to reduce post-backs I decided to implement client-side validation -- do the same validation as server (but keep server-side for security reasons). I could not find the answer to this easily -- Does my client-side validation stop post-backs? I've noticed that having one client-side validation does not stop the other server-validations from doing a post-back. Currently I have 5 CustomValidators, all with ClientValidationFunction and OnServerValidate set. When the client script sets args.isValid as false, does it stop the postback fr...

.NET for client side?
Is this the idea of "Atlas" but using JavaScript rather than another technology? Atlas's goal is to abstract various browser implementations of DOM API and to ease out the developer's job to write rich client applications. Atlas hence makes use of the existing all-browser supported JavaScript to achieve this. Thanks for your reply.Let me convey my idea differently: I would like to author client side code using a class system. I recognise that Atlas is a technology for producing JS code, much in the same way that ASP.NET produces HTML for the browser.Will Atlas be m...

DataGrid Rollover Colors, select single, select multiple rows client side
Iam just adding some more lines to JakeJeck's post  http://forums.asp.net/792635/ShowPost.aspx Put this in a class file         public static DataGridItem ApplyRowRollover(DataGridItem item , string MouseOverColor , string MouseOutColor, string MouseClickColor )         {             item.Attributes.Add("onmouseover", "ChangeColorOver(this,'" + MouseOverColor + "','" + MouseClickColor + "');");           ...

Client Side Question
Hi My form has a button and a textbox, and what i want to do is fairly simple... The user will enter a number in the textbox(for the number of days), and when he clicks on the button, it will have a popup window asking the user if he wishes to go ahead and delete data before that specific date. I am able to have the message popup and ask the user, but the problem is that everytime i need to have a postback in order to update the webform, so i had a label around the button which does postback everytime mouseover. But because of doing that, i have created unnecessary traffic to the serve...

Question .NET 2.0 Webservices compatibility issue with .NET 1.1 Client
 Hi all,I have a web service that has been created in .NET 2.0 which returns a custom type 'trading addresses' which is based on a generic list containing trade address objects.Now I have called this web method from my .NET 1.1 client, and it seems I have a collection of type TradingAddresses. I am just wondering what exactly my type TradingAddresses is if it was a core Generic List in .NET 2.0. What do Generic list collections get converted to in .NET 1.1 when the wsdl is created?(also, some fields in the TradeAddress class are Nullable types, which is a .NET 2.0 only type, wh...

newbie's question,HttpResponse.Cache is server side cache or client side cache?
I mean if i want to cache some client-relate information,can i use the httpresponse.cache? The Cache object is server-side. Client caching is entirely controlled by the user's browser. So, you can only make suggestions to the client-side cache by using things like the Pragma-NoCache header....

To .NET or not .NET, that is the question
I'm running WinXP pro 32-bit, meaning I've got the version 1-dot-something of .NET that XP came with. I've been looking for various softwares, and more and more often come across .NET version 2 being prerequisite. No urgency for me re. my questions to this group - so far I have just decided to hit the red X on those download pages - but the desire for this newer version of .NET seems to be growing for me. Firstly, according to my (limited) research, newer .NET versions are inclusive of the previous ones, and the current version seems to be 3.5. So if I go for i...

selecting a .js at client side
 I have different types of .js files with different functions. I am only familiar with this approach        <script language="javascript" src="option1.js" type="text/javascript"></script> What I want to do now is to add a logic wherein I can select what .js should I use. Any ideas how could I achieve this?Example:if this     <script language="javascript" src="option1.js" type="text/javascript"></script> elseif    <script language=&q...

Client Side Validation Question...
I have a Comparison Validator and I compare to a date by setting: cv.ValueToCompare = Date.Today.AddYears(-10).ToShortDateString(); for some reason, the validator fails on a TWO digit year, but succeeds in a FOUR digit year. Now IF I set the value: cv.ValueToCompare = "05/05/94"; for validator works correctly for both TWO digit and FOUR digit years.. Why? Is there something I need to change in the general .js file? is there a work around besides text manipulation?ah! pooh! You could try: cv.ValueToCompare = Date.Today.AddYears(-10).ToStri...

List of client side function of extenders and controls for client side
Hello All,I am using AJAX control toolkit for my current project. Now I need to find out what client side functions I can call on an extender. Lets say I am using a PopControlExtender. Now I want to show the popup from a JS funtions.If I can do a guess then it would be something like this$find('ppce').show();From where I can find what client side functions I can call on those extensders. This is really a frusterating thing. I learn about extenders only from Learn tutorials, no help here and there. Can anybody please tell me where are documentations about all the extenders in the tool...

Web resources about - A JQuery selection question - asp.net.client-side

Selection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Australian cricket's most surprising Test selections
While Nathan Coulter-Nile's selection for Australia's Test cricket squad was a surprise, it's hardly the first the Aussie selectors have sprung ...

Multi-state plans and selection problems
... often similar in design. In fact, it may be hard for consumers to tell them apart. The short answer is network and the longer answer is selection. ...

Ed Feng's College Football Playoff Standings Predictions Before Selection Sunday
Bleacher Report Ed Feng's College Football Playoff Standings Predictions Before Selection Sunday Bleacher Report Will your team make the College ...

Hulu to offer lulu of a video selection
Site created by NBC Universal and News Corp. to debut Wednesday with shows from more than 50 TV networks, cable stations, and movie studios. ...

After Protest, VA Rescinds Selection Of Phoenix VA Overseer Who Misled Congress About Wait Times
After Protest, VA Rescinds Selection Of Phoenix VA Overseer Who Misled Congress About Wait Times

Prices For CFP and Bowl Game Tickets Dropping On Secondary Market After Selection Sunday
The College Football Playoff and bowl schedule are officially set, and ticket prices have already begun to fall on the secondary market. Both ...

AP PHOTOS: A Selection of Pictures From the Past Week
AP PHOTOS: A selection of pictures from the past week

Today’s selection of articles from Kotaku’s reader-run community: Rodea the Sky Soldier: The TAY Rev
Today’s selection of articles from Kotaku ’s reader-run community: Rodea the Sky Soldier : The TAY Review • Jessica Jones : AKA We’re All Born ...

AP PHOTOS: A selection of pictures from the past week
Albuquerque’s source for local news and live streaming video online. KRQE reports on news, weather, traffic, investigations and sports for New ...

Resources last updated: 12/18/2015 2:48:36 PM