Created
          July 30, 2016 17:24 
        
      - 
      
- 
        Save apsolut/d2898ecb846cae3d6c202fcaa801207e to your computer and use it in GitHub Desktop. 
    get_image_div_class_each
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | var getallimages = ''; | |
| var Icons = {}; | |
| jQuery('#voc_fullstage_img #voc_ext_pics').find('.voc_Stage').each(function(index) { | |
| var text = jQuery(this).find('img').attr('src'); | |
| if (text.indexOf('(alias)') === -1) { | |
| Icons[text.trim()] = text.trim().split('-').join(' '); | |
| } | |
| }); | |
| var keys = Object.keys(Icons), | |
| i, len = keys.length, | |
| kicon, ktext = ''; | |
| keys.sort(); | |
| for (i = 0; i < len; i++) { | |
| kicon = [i]; | |
| ktext = keys[kicon]; | |
| getallimages += "\t'" + kicon + '\'\t => \'' + ktext + '\',\n'; | |
| } | |
| getallimages = '$icons = array(\n' + getallimages + ');\n'; | |
| console.info(getallimages); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment