<label class="c-input c-radio">
<input id="radio-1" name="radio" type="radio" value="5">
<span class="c-indicator"></span>
5
<label class="c-input c-radio">
<input id="radio-1" checked name="radio" type="radio" value="5">
<span class="c-indicator"></span>
5
$('body').on('click' , 'li' , function(e){
e.preventDefault();
menu.slideToggle();
});
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<title>TEST</title>
<script>
$(function(){
$( "#datepicker" ).datepicker( {dateFormat: 'mm-dd-yy'} );
$('body').on('click', '#format2', function(){
$( "#datepicker" ).datepicker( "option", "dateFormat", 'yy' );
});
$('body').on('click', '#format1', function(){
$( "#datepicker" ).datepicker( "option", "dateFormat", 'MM' );
});
});
</script>
<p>Дата с форматом: <input type="text" id="datepicker"></p>
<input type='button' id='format1' value='формат1'>
<input type='button' id='format2' value='формат2'>
<div class="spisok">
<ul>
<li>
<label for="value-1">
<span><input type="checkbox" class='checkbox' id="value-1" value="1"></span>
<span>опция 1</span>
</label>
</li>
<li>
<label for="value-2">
<span><input type="checkbox" class='checkbox' id="value-2" value="2"></span>
<span>опция 2</span>
</label>
</li>
<li>
<label for="value-3">
<span><input type="checkbox" class='checkbox' id="value-3" value="3"></span>
<span>опция 3</span>
</label>
</li>
</ul>
</div>
<div class="vybrano">
здесь должны показываться отмеченные значения чекбоксов
</div>
$('.checkbox').click(function(){
var el = $(this);
if(el.prop('checked')){
$('.vybrano').append('<div class="added" valu="'+el.val()+'">'+ el.val()+'-remove</div>');
}
else{
$('[valu="'+ el.val()+ '"]').remove();
}
});
$('body').on ('click' , '.added' , function(){
var el = $(this);
var id = '#value-' + el.attr('valu');
el.remove();
$(id).prop('checked' , false);
});
var t = [{n:5,v:7} ,{n:4,v:8} ,{n:5,v:99} ];
var opa = {n:4,v:8};
for (var e = 0 ; e<t.length; e++){
if( JSON.stringify(t[e])=== JSON.stringify(opa)){
console.log(t[e]);
}
}
$("#send").click(function(){
console.log('hi!');
$.post("test.php", { name: "John", time: "2pm" } );
$(location).attr('href', '/test.php');
});
var TestApp = angular.module("TestApp", []);
function TestCtrl($scope) {
$scope.t1 = {name:'vasya'};
$scope.t2 = $scope.t1;
}
t1- {{t1.name}}<br><br>
<input type='text' ng-model='t1.name'><br>
t2- {{t2.name}}
<div class="edit_position">
<input id="position_y" value="0" type="range" min="0" max="100" step="0">
<div id="position_images"
style="background-image: url(http://storage4.static.itmages.ru/i/16/0109/h_1452366540_5854535_7e16dcb9c5.jpg);
background-position: 0% 0%;"></div>
<div class="clear"></div>
<input id="position_x" value="0" onchange="editPosX();" type="range" min="0" max="100" step="0">
</div>
<input type='text' id='info'>
function editPosX(){
document.getElementById('info').value= document.getElementById('position_x').value;
}
..... success(function (data) {
$scope.data_from_server = data;
});
</head>
<body ng-app="app">
<div class="container">
<div class="profile" ng-controller="profileCtrl">
<div id="First_name"> {{data_from_server.First_name}} </div>
<div id="Last_name"> {{data_from_server.Last_name}} </div>
..........
</div>
</div>
</body>