Hi Scott! Thanks again for the help. I really appreciate it. :)
> Looks right to me. One alternative, which wouldn't break the chain if
> target is not supplied properly, would be this:
Ah, right. That is a smart solution. Thanks for the clarification!
> I don't think it's overkill for your in
On Dec 21, 4:06 pm, Micky Hulse wrote:
> Ok, so how does this look:
>
> (function($) {
> $.fn.myFunction = function(id) {
> var $target = $('#' + id);
> if($target.length > 0) {
> return this.each(function() {
>
Hi Scott! Many thanks for your pro help and super fast reply! I really
appreciate it. :)
> There are a few options. I often add an optional errorHandler
> ..
> Then your code can check that the required parameter is there.
Oooh, that is nice! Cool technique! Thanks for sharing. :)
> Alterna
On Dec 21, 3:08 pm, Micky Hulse wrote:
> But, I guess I am wondering what the best way to handle javascript
> error checking for required options?
There are a few options. I often add an optional errorHandler
function; my defaults would include:
errorHandler: function(status, message) {}
a
4 matches
Mail list logo