Search Results

Search found 2 results on 1 pages for 'buggabill'.

Page 1/1 | 1 

  • Get Class List for Element with JQuery

    - by Buggabill
    Is there a way in JQuery to loop through or assign to an array all of the classes that are assigned to an element? ex. <div class="Lorem ipsum dolor_spec sit amet">Hello World!</div> I will be looking for a "special" class as in "dolor_spec" above. I know that I could use hasClass() but the actual class name may not necessarily be known at the time.

    Read the article

  • PHP readdir() not returning files in alphabetical order

    - by Buggabill
    I am reading through a directory with some pictures and such using a pretty simple implementation of readdir() like the following: if ($handle = opendir($path)) { while (false !== ($szFilename = readdir($handle))) { if ($szFilename[0] !== '.') { if (is_file($path.$szFilename)) { // do stuff } } } } The problem that I am having is that the files are not being read in alphabetical order as the docs for readdir() state: Returns the filename of the next file from the directory. The filenames are returned in the order in which they are stored by the filesystem. Another weird thing is that, on the local testing server, the same code works great. This is running on a server using the LAMP stack in both cases. I know that I can build an array and just sort it, but I was wondering if I was missing something in what I was doing. Thanks for any insight!

    Read the article

1