Profile
Achievement
anagaiyahoocom's Recent Snippets
- All /
« Prev 1 Next »
Place startTime() at beginning where timing is to start. Get the return value and set the start time variable. At end of script to time call execTime($start) passing the start time and this will calculate elapsed time of execution.
1
816
posted 12 years ago by anagaiyahoocom
This will search for specific type of tag in html doc and extract type attribute value and all attributes after it in tag.
0
816
posted 13 years ago by anagaiyahoocom
This will check if object is an array object.
This will add isArray() method to Array native object. Can be used to check if passed in object is an array. Future ecmascript 5 will have this included. Can use this in the meantime.
Using instance...
0
832
posted 13 years ago by anagaiyahoocom
This will detect if console.log is available in browser and display the message. Otherwise will display as alert message
0
713
posted 13 years ago by anagaiyahoocom
Is very inefficient to attach a anonymous function event handlers to multiple items in a selection. The function is duplicated for each element.
This shows how you can just create a single function and in the event handler callback just call that...
0
646
posted 13 years ago by anagaiyahoocom
Use this to page cache your pages. Will save page output to a file. Will check file modified date to get from file or retrieve again
1
661
posted 13 years ago by anagaiyahoocom
You can use JUri object to extract the path or query string from a any url
0
993
posted 13 years ago by anagaiyahoocom
Example of how to display HTTP error code and message on ajax response
0
762
posted 13 years ago by anagaiyahoocom
This will extract page handle between last slash and .html
0
725
posted 13 years ago by anagaiyahoocom