Sunday, December 11, 2011

Web page with {strong} elements with jQuery


selector with the jQuery html() and text() functions to
change the HTML code or text in all matching elements on a page. follow these steps to change the text in all the <strong> elements on a page:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”

“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>

<html>

<head>

<title>My Test Page</title>

<script type=”text/javascript” src=”js/jquery-1.4.min.js”></script>

<script type=”text/javascript”>

$(document).ready(function(){

var strongContent = ‘jQuery for Dummies’;

});

</script>

</head>

<body>

<strong>some name</strong><p>Some text<p>

<strong>another name</strong>

<p>More text<p>

<strong>another name</strong>

<p>Even more text<p>

<strong>your name</strong>

<p>Last bit of text<p>

</body>

</html>

Meta tag generator 4 seo
If else statement
Increase traffic your blogs
Popularity by massage
 Important of keywords
Boost your ranking with seo

Friday, December 9, 2011

Parents and Children Selectorswith jQuery


The following code shows two <div> elements, each with the same content inside:

<!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"><html>

<head>

<title>My Test Page</title>

<script type=”text/javascript” src=”scripts/jquery-1.6.4.min.js”></script>

<script type=”text/javascript”>$(document).ready(function(){

// code
$(‘div:first-child’).text(‘Change me.’);
//code

});

</script>

</head>

<body>

<div id=”myfirstdiv”>

<strong class=”changemytext”>your name goes here</strong>

<p class=”changemytext”>text here<p>

<strong>another name goes here</strong>

<p>More text here<p>

</div>

<div id=”myseconddiv”>

<strong class=”changemytext”>more name</strong>

<p class=”changemytext”>more text<p>

<strong>another name</strong>

<p>More text<p>

</div>

</body>

</html>




select elements based on their parents or children, try these selectors:



first-child: Selects the first child element. The following code selects the first child of the first <div> and changes the text of the selected element:

$(‘div:first-child’).text(‘Change me.’);


last-child: Selects the last child element. The following code selects the last child of the second <div> and changes the text of the selected element:

$(‘div:last-child’).text(‘Change me.’);


child: Selects the child element of the parent element. This code changes the text of every <strong> element that is a child of a <div> element


$(‘div > strong’).text(‘Change me.’);


You can find the complete list of selectors at http://api.jquery.com/category/selectors/.


Meta tag generator 4 seo
If else statement
Increase traffic your blogs
Popularity by massage
Tips 4 blog posting



Thursday, December 8, 2011

Changing Text Content with jQuery

Two elements with their HTML code swapped.Sometimes you don’t want the actual HTML code in an element; you want
only the text. To do so, replace the html() function with the text() function.
In the preceding example, you swapped the HTML code. If you want to
swap only the text and not the HTML code, use this code:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”

“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>

<html>

<head>

<title>My Test Page</title>

<script type=”text/javascript” src=”jquery-1.6.4.min.js”></script><script type=”text/javascript”>

$(document).ready(function(){

var strongContent = $(‘strong’).text();

var pContent = $(‘p’).text();

$(‘strong’).text(pContent);

$(‘p’).text(strongContent);

});

</script>

</head>

<body>

<strong>This is the text in the <em>STRONG</em> element.</strong>

<p>This is the text in the <em>P</em> element.</p>

</body>

</html>

Free create back link
Meta tag generator 4 seo
If else statement
Increase traffic your blogs
Free Web Promotion



Tuesday, December 6, 2011

HTML Elements, Attributes, and Positions on jQuery

HTML Elements, Attributes, and Positions:
Following are some order selectors and examples of their use with elements

in the preceding code:


radio: Selects all elements with the type attribute set to radio. The
following code returns the value 1 in an alert box:
alert( $(‘:radio’).length);


checkbox: Selects all elements with type attribute set to radio. The following code sets the checked attribute to true for all check boxes:

$(‘:checkbox’).attr({checked:’true’});



[attribute]: Selects all elements with a specific attribute. The following

code displays the number of <img> elements with a height attribute:

alert( $(‘img[height]’).length);


[attribute=value]: Selects all elements with a particular attribute set to a specific value. The following code displays the number of elements with a class attribute set to myclass:

alert( $(‘[class=myclass]’).length);



[attribute!=value]: Selects all elements with a particular attribute not set to a specific value. The following code displays the number of
elements with a class attribute that isn’t myclass. Elements with no class attribute are ignored:

alert( $(‘[class!=myclass]’).length);    

Free create back link
Meta tag generator 4 seo
Meta description taG
Free link for PR3
Website optimization technique


Sunday, December 4, 2011

Html elements

A few of
most common HTML elements you should know:



<html></html>: Tells the Web browser that everything inside the tags

should be considered a Web page.
<head></head>: Contains information that controls how the page is

displayed. Elements responsible for JavaScript and CSS code and calls to

other files are generally placed between these tags.

<title></title>: Contains the title of the Web page, displayed on the

title bar at the top of the browser.

<body></body>: Holds all the content of the page.

<style></style>: Controls the appearance and behavior of elements

on your Web page.

<script></script>: Makes JavaScript and other specified code available,

either by calling a file or code placed between these tags. jQuery is

included on the page with this tag.

<strong></strong>: Boldfaces any text within the tag.

<h1></h1>: Creates header text.

<div></div>: Creates a container of content.

<p></p>: Creates a paragraph.
<a></a>: Creates a hyperlink.

<img />: Displays an image. Note that this tag doesn’t have a matching

end tag, so a slash character is used inside the tag to denote the end of

the tag.
<form></form>: Creates a Web form that can send user-submitted information

to another Web page or code that can process this information.

<input></input>: Creates a form element, such as a radio button, text

input box, or a Submit button. Used as a child element inside <form>

</form>.
<br />: Inserts a line break. No matching end tag is needed.

<table></table>: Creates a table, along with child tags <tr></tr>

and <td></td>.


























































You can check MoreHTML elements is located at

www.w3.org/TR/REChtml40/index/elements.html.




Free create back link
Meta tag generator 4 seo
If else statement
Increase traffic your blogs
Popularity by massage

 

Blogs 4 seo/blogspot seo|blogs best 300x250 banners Copyright © 2011 -- Template created by O Pregador -- Powered by Blogger

Web Statistics