I see what you're saying about using properties that are not necessarily valid in XHTML. I just cannot understand how this guy is even creating the button (yea I see the code but I don't get it..it's a div!) or what event is causing it to be enabled or not.
On Jul 8, 12:38 pm, MorningZ <morni...@gmail.com> wrote: > "Morning, then tell my why the code is putting that in there straight > from the JCarousel plug-in?" > > "and tell me why then do we see it being added in the .js" > > You act like I wrote it, i have no idea why the author of that plugin > uses that method, or why you are having to take a week to understand > it > > You can add any property you want via js or even put it in the HTML > > <div disabled="true" foo="2" b="5">Some Text</div> > > ***that doesn't mean it's going to do anything out of the box*** (<-- > that's the point you seem to be missing here) > > With those fake/invalid properties used, they could still server a > purpose like: > > if ($("div#Next").attr("foo") == null) { alert("Next is enabled"); } > else { alert("Next is disabled"); } > > So it could still be useful, although not valid markup > > On Jul 8, 1:26 pm, expresso <dschin...@gmail.com> wrote: > > > >>>Why would you expect that to? As mentioned at the very top, there is > > > no "disabled" property of a <div> > > > and tell me why then do we see it being added in the .js and then > > while viewing source we see it in the HTML! It boggles my mind > > > <div class="jcarousel-next jcarousel-next-horizontal" style="display: > > block;" disabled="false"/> > > > obviously that IS how he's disabling or enabling the next button. But > > again based on what decision point? > > > On Jul 8, 12:15 pm, expresso <dschin...@gmail.com> wrote: > > > > The hardest part about this plug-in has been that after pouring over > > > the base code in his .js file I do not see how it's disabling the next > > > button. Based on what!?!?! I mean I can stare the code right in the > > > eye where it's happening but I cannot make sense of it: > > > > var self = this; > > > n = true; > > > this.buttonNext[n ? 'bind' : 'unbind'] > > > (this.options.buttonNextEvent, this.funcNext)[n ? 'removeClass' : > > > 'addClass'](this.className('jcarousel-next-disabled')).attr > > > ('disabled', n ? false : true); > > > this.buttonPrev[p ? 'bind' : 'unbind'] > > > (this.options.buttonPrevEvent, this.funcPrev)[p ? 'removeClass' : > > > 'addClass'](this.className('jcarousel-prev-disabled')).attr > > > ('disabled', p ? false : true); > > > > if (this.buttonNext.length > 0 && (this.buttonNext > > > [0].jcarouselstate == undefined || this.buttonNext[0].jcarouselstate ! > > > = n) && this.options.buttonNextCallback != null) { > > > this.buttonNext.each(function() > > > { self.options.buttonNextCallback(self, this, n); }); > > > this.buttonNext[0].jcarouselstate = true; > > > } > > > > if (this.buttonPrev.length > 0 && (this.buttonPrev > > > [0].jcarouselstate == undefined || this.buttonPrev[0].jcarouselstate ! > > > = p) && this.options.buttonPrevCallback != null) { > > > this.buttonPrev.each(function() > > > { self.options.buttonPrevCallback(self, this, p); }); > > > this.buttonPrev[0].jcarouselstate = p; > > > } > > > > On Jul 8, 12:06 pm, expresso <dschin...@gmail.com> wrote: > > > > > We couldn't just set the size like they did either. Because we don't > > > > want to set a size greater than the # of elements we're showing. So I > > > > wanted to set # of items to show and on click of next it dynamically > > > > figures out how many more elements to show. So if I specify 4, I even > > > > have some JavaScript that manipulates the DOM and expands the control > > > > to fit 4 but also, if the array of IDs doesn't have an even number, > > > > the last scroll will only scroll x more to show the rest. > > > > > It's similar but doesn't quite fullfill our needs, the examples he > > > > has. > > > > > On Jul 8, 12:02 pm, expresso <dschin...@gmail.com> wrote: > > > > > > Charlie, you also don't understand that we are using deferred > > > > > loading. And I'm reading an array of IDs from a JS variable. based > > > > > on those IDs I send a JSON request / response and then I get that > > > > > back. I'm making this control much more dynamic than their out of box > > > > > example here: > > > > > http://sorgalla.com/projects/jcarousel/examples/dynamic_flickr_api.html > > > > > > that logic can't be reused..it's custom to the Flickr API. We're not > > > > > loading ours like this. So I couldnt' just reuse the way they were > > > > > doing that there. > > > > > > On Jul 8, 11:57 am, expresso <dschin...@gmail.com> wrote: > > > > > > > jQuery(".jcarousel-skin-ie7 .jcarousel-next.jcarousel-next- > > > > > > horizontal").attr("disabled","true"); did not work. > > > > > > > On Jul 8, 11:06 am, amuhlou <amysch...@gmail.com> wrote: > > > > > > > > It doesn't look like what you're trying to select exists. the > > > > > > > "jcarousel-next" and "jcarousel-next-horizontal" classes are being > > > > > > > applied to the same div, so there shouldn't be a space between > > > > > > > them in > > > > > > > your selector. > > > > > > > > Additionally, it appears your syntax for the attribute selector is > > > > > > > incorrect > > > > > > > > Have you tried jQuery(".jcarousel-skin-ie7 .jcarousel-next- > > > > > > > horizontal").attr("disabled","true"); > > > > > > > or > > > > > > > jQuery(".jcarousel-skin-ie7 .jcarousel-next.jcarousel-next- > > > > > > > horizontal").attr("disabled","true"); > > > > > > > > On Jul 8, 11:40 am, BaBna <thomas.na...@gmail.com> wrote: > > > > > > > > > Because it sucks? > > > > > > > > It might create problems with some DTD I think, and maybe this > > > > > > > > disable > > > > > > > > on a DIV is an IE "special feature", I don't know. > > > > > > > > Anyway, what do you want to achieve here? > > > > > > > > > On Jul 8, 4:30 pm, "Cesar Sanz" <the.email.tr...@gmail.com> > > > > > > > > wrote: > > > > > > > > > > How come is that you want to disable a div?? > > > > > > > > > > Do you mean, block the content inside div? > > > > > > > > > > ----- Original Message ----- > > > > > > > > > From: "BaBna" <thomas.na...@gmail.com> > > > > > > > > > To: "jQuery (English)" <jquery-en@googlegroups.com> > > > > > > > > > Sent: Wednesday, July 08, 2009 9:28 AM > > > > > > > > > Subject: [jQuery] Re: Cannot disable div > > > > > > > > > > Maybe because there is no disabled property for DIV? > > > > > > > > > >http://www.w3schools.com/tags/tag_DIV.asp > > > > > > > > > > On Jul 8, 4:25 pm, expresso <dschin...@gmail.com> wrote: > > > > > > > > > > <div class="jcarousel-skin-ie7"> > > > > > > > > > > <div class="jcarousel-container > > > > > > > > > > jcarousel-container-horizontal" > > > > > > > > > > style="display: block; height: 220px; width: 592px;"> > > > > > > > > > > <div class="jcarousel-prev jcarousel-prev-horizontal" > > > > > > > > > > style="display: > > > > > > > > > > block;" disabled="false"/> > > > > > > > > > > <div class="jcarousel-next jcarousel-next-horizontal" > > > > > > > > > > style="display: > > > > > > > > > > block;" disabled="false"/> > > > > > > > > > > <div class="jcarousel-clip jcarousel-clip-horizontal" > > > > > > > > > > style="width: > > > > > > > > > > 600px; height: 220px;"> > > > > > > > > > > <ul id="mycarousel" class="jcarousel-list > > > > > > > > > > jcarousel-list-horizontal" > > > > > > > > > > style="height: 220px; width: 3315px; left: -2028px;"> > > > > > > > > > > </ul> > > > > > > > > > > </div> > > > > > > > > > > </div> > > > > > > > > > > </div> > > > > > > > > > > > I'm trying to change disabled to true. It's not taking. And > > > > > > > > > > what I > > > > > > > > > > also don't get is what is disable doing for a div? > > > > > > > > > > > I have tried this: > > > > > > > > > > > jQuery(".jcarousel-skin-ie7 .jcarousel-next .jcarousel-next- > > > > > > > > > > horizontal").attr({ disabled: "true" });