This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<meta charset='utf-8' /> | |
<title>Renaming Tabs</title> | |
<script TYPE='text/javascript' src='jquery-1.4.4.min.js'></script> | |
<script TYPE='text/javascript' src='ui/jquery-ui-1.8.10.custom.js'></script> | |
<link rel='stylesheet' type='text/css' href='themes/smoothness/jquery.ui.all.css' /> | |
<script type='text/javascript'> | |
$(function() { | |
$('#tabs').tabs(); | |
$('.rename').live('click', function() { | |
$('#tabs').find('ul li a[href="#' + $(this).parentsUntil('#tabs').last().attr('id') + '"]').text('New Title'); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<div id='tabs'> | |
<ul> | |
<li><a href='#tab'>Title</a></li> | |
</ul> | |
<div id='tab'> | |
<input class='rename' type='button' value='Rename' /> | |
</div> | |
</div> | |
</body> | |
</html> |
3 comments:
this is not good
How come?
this is good ... works for me.
Post a Comment