It is always a good idea to put the way you achieve your results.. Maybe other people is looking
the same as you..

We must to learn not being so selfish!
----- Original Message ----- From: "expresso" <dschin...@gmail.com>
To: "jQuery (English)" <jquery-en@googlegroups.com>
Sent: Thursday, July 02, 2009 8:52 PM
Subject: [jQuery] Re: Replace div with another div



Richard, I have a reason for wanting to do this other than the default
behavior.  Anyhow, I got this working without having to do any of this
in the end!

On Jul 2, 7:59 pm, Ricardo <ricardob...@gmail.com> wrote:
Are you sure you need to do that? The button is disabled when you get
to the first/last item, if you add new items following the documented
ways it is completely unnecessary:http://sorgalla.com/projects/jcarousel/#Dynamic-Content-Loading

-- ricardo

On Jul 2, 11:45 am, expresso <dschin...@gmail.com> wrote:

> I want to replace it with <div class="jcarousel-prev jcarousel-prev-
> horizontal" style="display:
> block;" disabled="false"/> which is what the carousel code replaces it
> with anyway when the button IS enabled..I just viewed the source to
> see that.

> On Jul 2, 9:42 am, expresso <dschin...@gmail.com> wrote:

> > Charlie, I just plan on using an ID or class that's already in that
> > div to reference it. For example:
> > <div class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-
> > disabled jcarousel-prev-disabled-horizontal" style="display: block;"
> > disabled="true"/>

> > why couldn't I do something like $(".jcarousel-prev jcarousel-prev-
> > horizontal jcarousel-prev-
> > disabled jcarousel-prev-disabled-horizontal").replaceWith('<div
> > class="jcarousel-prev jcarousel-prev-horizontal" style="display:
> > block;" disabled="false"/>');

> > On Jul 2, 9:04 am, Charlie <charlie...@gmail.com> wrote:

> > > one problem you'll likely run into completely replacing that div
> > > even though the html and classes will fit in with the carousel you > > > could have problems due to no events attached to new div from > > > document ready
> > > Giovanni Battista Lenoci wrote:
> > > expresso ha scritto:I'm trying to figure out how I'd explicitely > > > change out a div. > > > Lets say this div is in the page. I guess first I'd have to verify > > > if
> > > it's in the page:
> > > <div class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-
> > > disabled jcarousel-prev-disabled-horizontal" style="display: block;"
> > > disabled="true"/>
> > > And if it is, I want to remove it and add this in the same place:
> > > <div class="jcarousel-prev jcarousel-prev-horizontal" > > > style="display:
> > > block;" disabled="false"/>
> > > I have not a clue how to do this.
> > > If give a unique id to the div (or you have a rule to get it, for > > > example $('#mycontainer > div'));
> > > You can do:
> > > $('#id').replaceWith('<div>my newmarkup!</div>');
> > > If the selector doesn't return nothing then nothing will be > > > replaced. > > > Bye

Reply via email to