Commit 5292feea05d1fa388ddd504a9a0d1aa2665ec0c9

  • avatar
  • arvind
  • Fri Nov 23 19:02:20 IST 2012
Merging code for differentiating content based on tags
.gitignore
(2 / 0)
  
3333.mr.developer.cfg
3434.project
3535.pydevproject
36
37*.*~
js/main.js
(19 / 0)
  
1var template = _.template($('#image-template').html());
2$("#select").on('change',onSelectChange);
3M = {};
4$.getJSON("http://localhost:60/js/maraa.json",function(data){
5 M = data;
6 _.each(data.image_list, function(item) {
7 if(item.tag == "CR")
8 x = $('#imgs').append(template({
9 img: item.image
10 }))});
11});
12function onSelectChange(e){
13 $("#imgs").html('');
14 _.each(M.image_list, function(item) {
15 if(item.tag == e.currentTarget.value)
16 x = $('#imgs').append(template({
17 img: item.image
18 }));});
19}