[jQuery] Re: Load specific id on click

2008-06-25 Thread Ischa Gast
Damn, I thought it works on Firefox/Safari/Opera on the mac then it should
also work in Internet Explorer, but is does not :(

On Wed, Jun 25, 2008 at 11:56 AM, Doover <[EMAIL PROTECTED]> wrote:

>
> Thank you so much for this! :)
>
> On May 29, 11:48 pm, IschaGast <[EMAIL PROTECTED]> wrote:
> > After some searching I found the solution:
> >
> > $('#content_main div.weblog_archive li a').livequery('click',
> > function(event) {
> > $('div.article_ajax').load($(this).attr("href") + '
> div.article');
> > event.preventDefault();
> >
> > });
> >
> > On May 28, 9:34 pm, IschaGast <[EMAIL PROTECTED]> wrote:
> >
> > > At the moment this is my code:
> > > $('#content_main div.weblog_archive li a').click(function() {
> > > $(' > > div>').insertAfter('div.article').load(this.href);
> > > $('div.weblog_articles_ajax div.article').livequery(function()
> {
> > > $(this).html();
> > > });
> > > return false
> >
> > > });
> >
> > > You can see it in action over here:
> http://ischagast.nl/janhekmanschool/nieuwsbrief/archief/
> > > It's loading the whole page but now I only want that div.article to be
> > > loaded.
> >
> > > I think I am doing something wrong over here:
> > > $('div.weblog_articles_ajax div.article').livequery(function() {
> > > $(this).html();
> >
> > > });
> >
> > > On May 28, 10:45 am, Sid <[EMAIL PROTECTED]> wrote:
> >
> > > >Loadthe entire page and then parse it with
> >
> > > > $("#div_you_want").html();
> >
> > > > This will return everything within div_you_want including HTML tags.
> >
> > > > Use .text() if you need only the text stripped of HTML.
> >
> > > > Note: Since ur loading the page dynamically, jQuery will not
> > > > automatically update the DOM, so use a plugin like liveQuery, in
> which
> > > > case it will be
> >
> > > > $("#div_you_want").livequery(function() {
> > > > $(this.id).html/text();
> >
> > > > });IschaGastwrote:
> > > > > I have a page with an archive of all newsletters:
> > > > >http://ischagast.nl/janhekmanschool/nieuwsbrief/archief/
> >
> > > > > What I want is that when clicking a month the results of that month
> > > > > appear under the months just like this site:
> > > > >http://loweblog.com/archives/
> >
> > > > > I thought building that with jquery would be simple, something like
> > > > > this:
> >
> > > > > $('#content_main div.weblog_archive li a').click(function() {
> > > > >$('div.article').load(this.href);
> > > > >return false
> > > > > });
> >
> > > > > This works good but I only want toloadthe div.article and thats
> > > > > something I could not get to work.
> > > > > I thought maybe something like this could work but it does not:
> >
> > > > > .load(this.href + "div.article");
> >
> > > > > What works?
>
> >
>


[jQuery] Re: Load specific id on click

2008-06-25 Thread Doover

Thank you so much for this! :)

On May 29, 11:48 pm, IschaGast <[EMAIL PROTECTED]> wrote:
> After some searching I found the solution:
>
> $('#content_main div.weblog_archive li a').livequery('click',
> function(event) {
>         $('div.article_ajax').load($(this).attr("href") + ' div.article');
>         event.preventDefault();
>
> });
>
> On May 28, 9:34 pm, IschaGast <[EMAIL PROTECTED]> wrote:
>
> > At the moment this is my code:
> > $('#content_main div.weblog_archive li a').click(function() {
> >         $(' > div>').insertAfter('div.article').load(this.href);
> >         $('div.weblog_articles_ajax div.article').livequery(function() {
> >                 $(this).html();
> >         });
> >         return false
>
> > });
>
> > You can see it in action over 
> > here:http://ischagast.nl/janhekmanschool/nieuwsbrief/archief/
> > It's loading the whole page but now I only want that div.article to be
> > loaded.
>
> > I think I am doing something wrong over here:
> > $('div.weblog_articles_ajax div.article').livequery(function() {
> >         $(this).html();
>
> > });
>
> > On May 28, 10:45 am, Sid <[EMAIL PROTECTED]> wrote:
>
> > >Loadthe entire page and then parse it with
>
> > > $("#div_you_want").html();
>
> > > This will return everything within div_you_want including HTML tags.
>
> > > Use .text() if you need only the text stripped of HTML.
>
> > > Note: Since ur loading the page dynamically, jQuery will not
> > > automatically update the DOM, so use a plugin like liveQuery, in which
> > > case it will be
>
> > > $("#div_you_want").livequery(function() {
> > > $(this.id).html/text();
>
> > > });IschaGastwrote:
> > > > I have a page with an archive of all newsletters:
> > > >http://ischagast.nl/janhekmanschool/nieuwsbrief/archief/
>
> > > > What I want is that when clicking a month the results of that month
> > > > appear under the months just like this site:
> > > >http://loweblog.com/archives/
>
> > > > I thought building that with jquery would be simple, something like
> > > > this:
>
> > > > $('#content_main div.weblog_archive li a').click(function() {
> > > >    $('div.article').load(this.href);
> > > >    return false
> > > > });
>
> > > > This works good but I only want toloadthe div.article and thats
> > > > something I could not get to work.
> > > > I thought maybe something like this could work but it does not:
>
> > > > .load(this.href + "div.article");
>
> > > > What works?


[jQuery] Re: Load specific id on click

2008-05-29 Thread IschaGast

After some searching I found the solution:

$('#content_main div.weblog_archive li a').livequery('click',
function(event) {
$('div.article_ajax').load($(this).attr("href") + ' div.article');
event.preventDefault();
});


On May 28, 9:34 pm, IschaGast <[EMAIL PROTECTED]> wrote:
> At the moment this is my code:
> $('#content_main div.weblog_archive li a').click(function() {
> $(' div>').insertAfter('div.article').load(this.href);
> $('div.weblog_articles_ajax div.article').livequery(function() {
> $(this).html();
> });
> return false
>
> });
>
> You can see it in action over 
> here:http://ischagast.nl/janhekmanschool/nieuwsbrief/archief/
> It's loading the whole page but now I only want that div.article to be
> loaded.
>
> I think I am doing something wrong over here:
> $('div.weblog_articles_ajax div.article').livequery(function() {
> $(this).html();
>
> });
>
> On May 28, 10:45 am, Sid <[EMAIL PROTECTED]> wrote:
>
> > Load the entire page and then parse it with
>
> > $("#div_you_want").html();
>
> > This will return everything within div_you_want including HTML tags.
>
> > Use .text() if you need only the text stripped of HTML.
>
> > Note: Since ur loading the page dynamically, jQuery will not
> > automatically update the DOM, so use a plugin like liveQuery, in which
> > case it will be
>
> > $("#div_you_want").livequery(function() {
> > $(this.id).html/text();
>
> > });IschaGastwrote:
> > > I have a page with an archive of all newsletters:
> > >http://ischagast.nl/janhekmanschool/nieuwsbrief/archief/
>
> > > What I want is that when clicking a month the results of that month
> > > appear under the months just like this site:
> > >http://loweblog.com/archives/
>
> > > I thought building that with jquery would be simple, something like
> > > this:
>
> > > $('#content_main div.weblog_archive li a').click(function() {
> > >$('div.article').load(this.href);
> > >return false
> > > });
>
> > > This works good but I only want to load the div.article and thats
> > > something I could not get to work.
> > > I thought maybe something like this could work but it does not:
>
> > > .load(this.href + "div.article");
>
> > > What works?


[jQuery] Re: Load specific id on click

2008-05-28 Thread IschaGast

At the moment this is my code:
$('#content_main div.weblog_archive li a').click(function() {
$('').insertAfter('div.article').load(this.href);
$('div.weblog_articles_ajax div.article').livequery(function() {
$(this).html();
});
return false
});

You can see it in action over here: 
http://ischagast.nl/janhekmanschool/nieuwsbrief/archief/
It's loading the whole page but now I only want that div.article to be
loaded.

I think I am doing something wrong over here:
$('div.weblog_articles_ajax div.article').livequery(function() {
$(this).html();
});



On May 28, 10:45 am, Sid <[EMAIL PROTECTED]> wrote:
> Load the entire page and then parse it with
>
> $("#div_you_want").html();
>
> This will return everything within div_you_want including HTML tags.
>
> Use .text() if you need only the text stripped of HTML.
>
> Note: Since ur loading the page dynamically, jQuery will not
> automatically update the DOM, so use a plugin like liveQuery, in which
> case it will be
>
> $("#div_you_want").livequery(function() {
> $(this.id).html/text();
>
> });IschaGastwrote:
> > I have a page with an archive of all newsletters:
> >http://ischagast.nl/janhekmanschool/nieuwsbrief/archief/
>
> > What I want is that when clicking a month the results of that month
> > appear under the months just like this site:
> >http://loweblog.com/archives/
>
> > I thought building that with jquery would be simple, something like
> > this:
>
> > $('#content_main div.weblog_archive li a').click(function() {
> >$('div.article').load(this.href);
> >return false
> > });
>
> > This works good but I only want to load the div.article and thats
> > something I could not get to work.
> > I thought maybe something like this could work but it does not:
>
> > .load(this.href + "div.article");
>
> > What works?


[jQuery] Re: Load specific id on click

2008-05-28 Thread IschaGast

I tried something like this and that works:
$('#content_main div.weblog_archive li a').click(function() {
$('div.article').load("http://ischagast.nl/janhekmanschool/
nieuwsbrief/archief_maand/2008/05/ div.article");
return false
});

But that url (http://ischagast.nl/janhekmanschool/nieuwsbrief/
archief_maand/2008/05/) must not be the same everytime but it has to
be different every time.
I wanted to store it in a variable liuke this var $test = this.href
but how do I get it in that load thing?

I tried this but that did not work:
$('#content_main div.weblog_archive li a').click(function() {
var $test = this.href;
$('div.article').load("$test div.article");
return false
});


On May 27, 11:53 pm, IschaGast <[EMAIL PROTECTED]> wrote:
> I have a page with an archive of all 
> newsletters:http://ischagast.nl/janhekmanschool/nieuwsbrief/archief/
>
> What I want is that when clicking a month the results of that month
> appear under the months just like this site:http://loweblog.com/archives/
>
> I thought building that with jquery would be simple, something like
> this:
>
> $('#content_main div.weblog_archive li a').click(function() {
> $('div.article').load(this.href);
> return false
>
> });
>
> This works good but I only want to load the div.article and thats
> something I could not get to work.
> I thought maybe something like this could work but it does not:
>
> .load(this.href + "div.article");
>
> What works?


[jQuery] Re: Load specific id on click

2008-05-28 Thread Sid

Load the entire page and then parse it with

$("#div_you_want").html();

This will return everything within div_you_want including HTML tags.

Use .text() if you need only the text stripped of HTML.

Note: Since ur loading the page dynamically, jQuery will not
automatically update the DOM, so use a plugin like liveQuery, in which
case it will be

$("#div_you_want").livequery(function() {
$(this.id).html/text();
});

IschaGast wrote:
> I have a page with an archive of all newsletters:
> http://ischagast.nl/janhekmanschool/nieuwsbrief/archief/
>
> What I want is that when clicking a month the results of that month
> appear under the months just like this site:
> http://loweblog.com/archives/
>
> I thought building that with jquery would be simple, something like
> this:
>
> $('#content_main div.weblog_archive li a').click(function() {
>   $('div.article').load(this.href);
>   return false
> });
>
> This works good but I only want to load the div.article and thats
> something I could not get to work.
> I thought maybe something like this could work but it does not:
>
> .load(this.href + "div.article");
>
> What works?