var array1 = [1, 2, 3, 4, 5, 6];
var array2 = [1, 2, 3, 4, 5, 6, 7, 8, 9];
var diff = [];
var same=[];
jQuery.grep(array2, function(el) {
if (jQuery.inArray(el, array1) == -1) diff.push(el);
if (jQuery.inArray(el, array1) != -1) same.push(el);
});
alert(" the difference is " + diff+"same is "+same);
Compare Two array are same
var array1 = [4,8,9,10];
var array2 = [4,8,9,10];
var is_same = array1.length == array2.length && array1.every(function(element, index) {
return element === array2[index];
});
console.log(is_same);
for(j=0;j<final_ans.length;j++){
if(get_ans[j] != final_ans[j]){
console.log(get_ans[j]+' ------------------not equal---+'+ "#" + get_ans_id[j]+"li div" +'---------- '+final_ans[j] )
$("#" + get_ans_id[j]+" li div").addClass("wrong");
$("#" + get_ans_id[j]+" li div").css("display", "block");
}
else{
// $('#msg').val('')
console.log(get_ans[j]+' ---------------equal---------------- '+final_ans[j] )
$("#" + get_ans_id[j]+" li div").addClass("correct");
$("#" + get_ans_id[j]+" li div").css("display", "block");
}
}
HTML 5 and CSS3 Useful Jquery and JS Adobe Flash Basics,tips and tricks Flickr http://www.flickr.com/photos/53336704@N05/
Tuesday, October 13, 2015
Wednesday, July 15, 2015
Passing Scores from Flash Games to LMS & CMS
http://elearningbrothers.com/passing-scores-from-flash-games-to-lectora/
http://pipwerks.com/
https://code.google.com/p/swf-activity-module/w/list
Friday, January 16, 2015
HTML5 Misc
Types of Layout in HTML5
- Fixed websites have a set width and resizing the browser or viewing it on different devices won’t affect on the way the website looks.
- Fluid websites are built using percentages for widths. As a result, columns are relative to one another and the browser allowing it to scale up and down fluidly.
- Adaptive websites introduce media queries to target specific device sizes, like smaller monitors, tablets, and mobile.
- Responsive websites are built on a fluid grid and use media queries to control the design and its content as it scales down or up with the browser or device.
Hide HTML5 video 'Controls' for Browser and iPad
<video id="video" controls src="video.mp4" poster="image.jpg" preload="auto" onplaying="this.controls=false"/></video>
HitTest on Transparent PNG Jquery plugin
This plugin allow to test dom objects collision and coordinates hitTest.The collision detection works on mobile and on desktop. It manage image and canvas transparency on rencent web browsers. The transparency is manage on canvas elements compatible web browsers.(on old web browsers, the tests are done on rectangular areas)
http://e-smartdev.com/en/#!jsPluginList/hittestJQuery
Subscribe to:
Posts (Atom)