This has got me stumped the following code:
<!DOCTYPE html>
<html ng-app>
<head>
<script src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<script>
function ctrl($scope){
$scope.submit = function(e){
var elem = angular.element(e.srcElement);
alert($(elem.parent()).html());
//alert ('first name ' + person.first + ' last name ' + person.last);
};
}
</script>
</head>
<body>
<div ng-controller="ctrl">
First: <input name="first" value="will" />
Last: <input name="last" value = "kriski" />
<input type="submit" name="submit" ng-click="submit($event)"/>
</div>
</body>
</html>
Work in jsfiddle and plunker fine (clicking the Submit but displays the HTML in the alert).
but when I run the same code both locally and my personal server the alert reads "undefined"
These both work: http://jsfiddle.net/sjmcpherso/yQs8z/193/ http://plnkr.co/qaqymNFQIe3ziyj7AKXa
The same pasted code on my personal server does not http://sjmcpherson.com/testing/test.html
Really confused