Simple Machine Codes
November 23, 2009, 12:06:33 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Affiliates Code Index Staff List Calendar Members Login Register  

Jquery and SMF For Free #2(Contains)


Pages: [1]   Go Down
  Print  
Author Topic: Jquery and SMF For Free #2(Contains)  (Read 310 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,664



View Profile WWW
« on: August 26, 2007, 02:51:27 pm »

The Contains Function
The Contains function is one of the main functions for Jquery.

Say you had something as easy as this:
Code:
<div>
<table><tr><td>Hello World</td></tr></table>
<table><tr><td>RAWR</td></tr></table>
</div>
Say you wanted to add something after the table that has the text of "Hello World" in it.  You would do this:
Code:
<script>
$("div table tr td:contains(Hello World)")
</script>

You do not have to have the "div table tr" part in it:
Code:
<script>
$("td").contains("Hello World")
</script>

This function does work with the 1.2.1 version of Jquery.
Code:
<script>
$("td:contains(Hello World)")
</script>

That just makes sure that your getting the exact tr with that certain text.
« Last Edit: February 26, 2008, 07:50:35 pm by Agent Moose » Report Spam   Logged

Celebrus
Artificially Conscious
Administrator

Offline Offline

Gender: Male
Posts: leet


aka Omikron


View Profile WWW
« Reply #1 on: August 28, 2007, 07:38:04 am »

I learnt that 'contains' is actually JQuery.
Report Spam   Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2006, Simple Machines LLC
ServerBeach Coupon