[jQuery] jQuery UI Problem

2009-05-11 Thread Rogue Lord

$('div.draggable').livequery(function(){
$(this).draggable({
helper: 'clone', opacity: '0.9'
});
var bag_id = $(this).attr('id');
$('div.droppable').droppable({
accept: 'div.draggable',
drop: function(event, ui) {
var parts_id = $(this).attr('id');
var bag_name = '#'+bag_id;
var parts_name = '#'+parts_id;
$.ajax({
method: 'GET', url: 'partreplace.php', 
data: 'part='+parts_id
+'&part2='+bag_id+'&s=start'
});
$.ajax({
method: 'GET', url: 'partreplace.php', 
data: 'part='+parts_id
+'&s=end',
success: function(html) {
$(parts_name).html(html);
}
});
$.ajax({
method: 'GET', url: 'partreplace.php', 
data: 'part2='+bag_id
+'&s=end2',
sucess: function(html) {
$(bag_name).html(html);
}
});
}
});
});

It updates the parts_name div but the bag_name div doesn't update even
though the partreplace.php is working correctly... Any ideas?

Using: LiveQuery Addon, jQuery UI for this function...


[jQuery] Re: NEW jQuery Cheat Sheet for 1.3.2

2009-05-08 Thread Rogue Lord

Looks good mate!

On May 7, 10:01 am, Matt Kruse  wrote:
> I've updated my previous cheat sheet to be in line with jQuery 1.3.2.
> I think it's more useful than other cheat sheets that simply dump
> method names, but hey, that's personal preference ;)
>
> http://www.javascripttoolbox.com/jquery/cheatsheet/
>
> Enjoy
>
> Matt Kruse


[jQuery] [jQuery AJAX]

2009-05-06 Thread Rogue Lord

I am using the jquery.form.js addon, and I was wondering if there was
a way that I could add something to check for a certain string in
resulting response? I am having a form sending an AJAX request to the
server which then places the result into the div that is used for
responses but I am unsure how to initialize a check when the div
updates that word is used in the div for example "experience"... when
that comes up I would like to disable a feature to keep the form from
submitting again...  Any ideas how I would check the string? Maybe
when I submit probably? Thanks for your help ahead of time...


[jQuery] Re: clueTip with liveQuery?

2009-04-18 Thread Rogue Lord


$('.commoninfo').livequery(function(){
$(this).cluetip({width: '260px', showTitle: false});
})

Figured it out!

On Apr 18, 1:55 am, Rogue Lord  wrote:
> How do I get these two to play nice with one another? lol...
>
> I am trying to run the clueTip inside a div that is using liveQuery
> because it was added after the page load via AJAX, any help is
> appreciated! I tried a few things but I am gonna see first if they are
> compatible... :)


[jQuery] clueTip with liveQuery?

2009-04-18 Thread Rogue Lord

How do I get these two to play nice with one another? lol...

I am trying to run the clueTip inside a div that is using liveQuery
because it was added after the page load via AJAX, any help is
appreciated! I tried a few things but I am gonna see first if they are
compatible... :)


[jQuery] Re: AJAX Problem

2009-04-17 Thread Rogue Lord

Ok got the pages to work with the livequery plugin but now I am having
a problem with the get data function... I know that the "data: "
should when using 'type: "GET"' should give me a similar effect to ?
id=1...

var replacement = $(this).attr("title");
var content_show = $(this).attr("id");
$.ajax({
type: "GET", url: replacement, data: 
content_show,
async: true,
beforeSend: 
function(){$("#loading").show("fast");},
complete: 
function(){$("#loading").hide("fast");},
success: function(html){ //so, if data is 
retrieved, store it in
html
$("#main_content").slideDown("slow"); 
//animation
$("#main_content").html(html); //show 
the html inside .content
div
}
});

any extra suggestions? Thanks!

On Apr 17, 12:56 pm, Karl Swedberg  wrote:
> You have run into a fairly common issue: how to get events to work  
> with elements that are added to the DOM, through either ajax or simple  
> DOM mainpulation, after the "document ready" code has already fired.
>
> This FAQ topic should answer your question:
>
> http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...
>
> If you still have problems after reading through it and trying one of  
> the many solutions, let us know.
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Apr 17, 2009, at 2:28 PM, Rogue Lord wrote:
>
>
>
> > Hey folks, I noticed that when I was using $.ajax() on a $('a').click
> > () to pull up an external page (eg "stats.php" within the same
> > folkder) within a div called #main_content that any link that was
> > pulled up in that would not have the same effects as outside of it. Is
> > there a way to pass the inheritance over to the links in the in div
> > that is holding the new page? I appreciate any advice before hand!


[jQuery] AJAX Problem

2009-04-17 Thread Rogue Lord

Hey folks, I noticed that when I was using $.ajax() on a $('a').click
() to pull up an external page (eg "stats.php" within the same
folkder) within a div called #main_content that any link that was
pulled up in that would not have the same effects as outside of it. Is
there a way to pass the inheritance over to the links in the in div
that is holding the new page? I appreciate any advice before hand!


[jQuery] Re: $.ajax get with ?var=123 not accepting data type

2009-04-16 Thread Rogue Lord

Ok, I figured out that because the links that are not working are in
the pages that are being pulled up into the main_content div, anyone
know how I can modify the code to run scripts that would modify the
same div?

On Apr 16, 6:32 pm, Rogue Lord  wrote:
> 
>         $(document).ready(function(){
>                 $('#main_content').load('cityhall.php');
>                 $('#loading').hide();
>                 $('a').click(function() {
>                         $("#main_content").slideUp();
>                         var replacement = $(this).attr("title");
>                         var content_show = $(this).attr("id");
>                         $.ajax({
>                                 method: "get", url: replacement, data: 
> content_show,
>                                 beforeSend: 
> function(){$("#loading").show("fast");},
>                                 complete: 
> function(){$("#loading").hide("fast");},
>                                 success: function(html){ //so, if data is 
> retrieved, store it in
> html
>                                         $("#main_content").slideDown("slow"); 
> //animation
>                                         $("#main_content").html(html); //show 
> the html inside .content
> div
>                                 }
>                         });
>                         $.ajax({
>                                 method: "get", url: 
> 'includes/side_mini.inc.php',
>                                 success: 
> function(html){$("#side_details").html(html);}
>                         });
>                         $.ajax({
>                                 method: "get", url: 
> 'includes/side_mini2.inc.php',
>                                 success: 
> function(html){$("#activity").html(html);}
>                         });
>                 });
>         });
> 
>
> In the first AJAX Get call it has a "data: vars" field that I was
> trying to use to pass a get var to the php like ?id=1, any ideas how I
> can do that to bring up a page like stats.php?id=1 ??? Thanks before
> hand!


[jQuery] $.ajax get with ?var=123 not accepting data type

2009-04-16 Thread Rogue Lord


$(document).ready(function(){
$('#main_content').load('cityhall.php');
$('#loading').hide();
$('a').click(function() {
$("#main_content").slideUp();
var replacement = $(this).attr("title");
var content_show = $(this).attr("id");
$.ajax({
method: "get", url: replacement, data: 
content_show,
beforeSend: 
function(){$("#loading").show("fast");},
complete: 
function(){$("#loading").hide("fast");},
success: function(html){ //so, if data is 
retrieved, store it in
html
$("#main_content").slideDown("slow"); 
//animation
$("#main_content").html(html); //show 
the html inside .content
div
}
});
$.ajax({
method: "get", url: 
'includes/side_mini.inc.php',
success: 
function(html){$("#side_details").html(html);}
});
$.ajax({
method: "get", url: 
'includes/side_mini2.inc.php',
success: 
function(html){$("#activity").html(html);}
});
});
});


In the first AJAX Get call it has a "data: vars" field that I was
trying to use to pass a get var to the php like ?id=1, any ideas how I
can do that to bring up a page like stats.php?id=1 ??? Thanks before
hand!