Very very good idea :)
Showing posts with label jquery. Show all posts
Showing posts with label jquery. Show all posts
02/12/2011
Select a specific column in table by content
To select a specific column by content, you can use the following jquery code:
$(document).ready(function () {
$('td').each(function () {
var $tds = $(this).find('td');
if ($tds.text() == "System Settings") {
<!--alert($currText = $tds.eq(0).text());-->
$tds.css("background-color", "#F6F6F6");
}
Read more...
26/01/2011
Set default value into text box, such us search text box
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
</head>
<body>
<script>
$(document).ready(function() {
$("#search")
.val("Search...")
.css("color", "#ccc")
.focus(function(){
$(this).css("color", "black");
if ($(this).val() == "Search...")
{
$(this).val("");
}
})
.blur(function(){
$(this).css("color", "#ccc");
if ($(this).val() == "")
{
$(this).val("Search...");
}
});
});
</script>
<input type="text" id="search">
</body>
Read more...
Subscribe to:
Posts (Atom)