Created
July 11, 2015 11:20
-
-
Save RamiAwar/26544eb2adcd0e741911 to your computer and use it in GitHub Desktop.
Simple (bootstrap/jquery) tweetbox (Frontend only wired)
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> | |
<head> | |
<meta name="description" content="Simple bootstrap and js tweetbox without React.js"> | |
<script src="http://fb.me/react-0.13.1.js"></script> | |
<script src="https://code.jquery.com/jquery.min.js"></script> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"> | |
</script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="well clearfix"> | |
<textarea class="form-control"></textarea><br/> | |
<button class="btn btn-primary pull-right">Tweet</button> | |
</div> | |
<script id="jsbin-javascript"> | |
$("button").prop("disabled", true); | |
$("textarea").on("input", function(){ | |
if ($(this).val().length>0){ | |
$("button").prop("disabled", false); | |
}else{ | |
$("button").prop("disabled", true); | |
} | |
}); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Simple bootstrap and js tweetbox without React.js"> | |
<script src="//fb.me/react-0.13.1.js"><\/script> | |
<script src="https://code.jquery.com/jquery.min.js"><\/script> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"> | |
<\/script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="well clearfix"> | |
<textarea class="form-control"></textarea><br/> | |
<button class="btn btn-primary pull-right">Tweet</button> | |
</div> | |
</body> | |
</html></script> | |
<script id="jsbin-source-javascript" type="text/javascript">$("button").prop("disabled", true); | |
$("textarea").on("input", function(){ | |
if ($(this).val().length>0){ | |
$("button").prop("disabled", false); | |
}else{ | |
$("button").prop("disabled", true); | |
} | |
});</script></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment