[jQuery] jquery UI sortable, how can i get the text of the that i just moved ?

2010-01-04 Thread kknaru
what i'm trying to do is to get the text that is contained by the
moved li, after the list item was moved. Is there a way to do that?
i tried: $(ui.item).text() but i get an ui is not defined error (i
imported just jquery.js, ui.core.js and ui.sortable.js , do i have to
import something else?)

thanks


[jQuery] Re: jquery preload images

2009-10-16 Thread kknaru

thanks for your help, that is a very good article


[jQuery] Re: jquery preload images

2009-10-16 Thread kknaru

can you give me some good references? i'm trying to understand the
process so i don;t want to use a plugin


[jQuery] Re: jquery preload images

2009-10-16 Thread kknaru

nobody? :(


[jQuery] jquery preload images

2009-10-15 Thread kknaru

ok, so i have this "slideshow.html" containing just a bunch of
pictures, and the "index.html".

index.html

click


slideshow.html





and i have my script like this;

$(document).ready(function(){
$('a').click(function(){
$('ul').append('');
   $('ul').load('slideshow.html',function(){
   $('#preloader').remove();
   });
});
});

so i want on click to append the preloader.gif and to call the load
method and after the images form the slideshow.html are loaded to
remove the animation. Using my script it won;t do the thing, the page
is loaded but the animation is dropped before the image is completely
loaded :( thanks


[jQuery] Re: how can i write a function that accepts a callback function

2009-10-10 Thread kknaru

many many thanks Mike! now i have a basic idea and i will focus on it
trying to implement it in my plugin. Thanks again


[jQuery] Re: how can i write a function that accepts a callback function

2009-10-10 Thread kknaru

i know that load accepts a callback, but i want to understand how to
write a function that accepts a callback function 'cause i want to use
it in a plugin. I'm new to plugin development so this are my first
steps in understanding this concepts.

ok, so i tried a simple script just to understand how it works. so on
anchor click i want to pop an alert message with the value specified
in function arguments and as a callback i want to increase the font
size...but...i don;t really get it. some help will be appreciated :)

so i have this:

(function($){
$.fn.extend({
//function name
itPops : function(value,callback){
//return
return this.each(function(){
var val = value;
$(this).click(function(){
alert(val);
return false;
})
})
}
});
})(jQuery);


$(document).ready(function(){
$('a').itPops(2,function(){
$(this).css({'font-size':'23px'});
});
});


so...can you shoe me pls on my code how should i do with that
callback? many thanks


[jQuery] Re: how can i write a function that accepts a callback function

2009-10-10 Thread kknaru

hmm...so..how should i "prepare" the data?

something like this?

var someData = $(selector).load("page.php",{...etc});

in this way the callback function will have access to the loaded
content as jquery wrapped set of elements?


[jQuery] how can i write a function that accepts a callback function

2009-10-10 Thread kknaru

hi there, how can i write a function that accepts a callback
function?

$(selector).myFunction(argument,options,function(){
   //do the thing
});

i want myFunction to load some data via(an unordored list actually)
load method end then somehow to return the wrapped elements for the
callback function, exactly like load() does.


[jQuery] Re: effect over images loaded via ajax (load method)

2009-10-10 Thread kknaru

hmm...nobody? :(


[jQuery] effect over images loaded via ajax (load method)

2009-10-09 Thread kknaru



i have some images loaded viad load method, something like this:


   
   


on mouseover i want to append a div inside that  with a greater z-
index than the img so that div comes "in front" of the image(like a
bar with links for image editing).On mouseout i want it to disappear.
anyway...the problem is that those images are constantly changed
(loaded via load method) and i tried something like this:

$('img').live('mouseover',function(){
$(this).append('links links');
});

$('img').live('mouseout',function(){
$('div').remove()
});

so...the actual problem is that when the mouse leaves the image area
and comes on the div area..the div disappear and appear continuously
so i can't click the links inside.Remember that the div comes "over"
the image(you know what i mean...it's a classic effect by now).
so..how should i do it right? thanks


[jQuery] Re: JQUERY form submit

2009-10-06 Thread kknaru

nope, is not that, the form and form/name "problem" is because i just
wrote in here a simplified version of the script and i mis-typed. in
the original script it's form_name/form_name. My form it looks like
it's submitted(the php page is loaded) but i get those errors in the
php because those values aren;t sent

On Oct 7, 3:27 am, James  wrote:
> The name of your form is "form", not "form_name" as you have in your
> Javascript.
> Do you have other fields aside from the upload field?
> Try putting other fields. In PHP do a "print_r($_REQUEST)" to see if
> you get anything.
>
> On Oct 6, 1:43 pm, kknaru  wrote:
>
> > hi i have something like this:
>
> > //
> > javascript--
>
> > $('a').click(function(){
>
> >        $('div').load('form.html',function(){
>
> >                 $('form[name="form_name"]').submit();
> >                                                       });
>
> > });
>
> > //main HTML
> > page
>
> > click
> >  
>
> > //the form.html
> > page---
>
> > 
> > 
> > 
>
> > ok, so...first i load the form.html page and then i try to submit the
> > loaded form, it looks fine but the php desn't receive the field value
> > (the php is very simple and there is no problem). what's wrong?!


[jQuery] JQUERY form submit

2009-10-06 Thread kknaru

hi i have something like this:

//
javascript--

$('a').click(function(){

   $('div').load('form.html',function(){

$('form[name="form_name"]').submit();
  });

});



//main HTML
page

click
 

//the form.html
page---






ok, so...first i load the form.html page and then i try to submit the
loaded form, it looks fine but the php desn't receive the field value
(the php is very simple and there is no problem). what's wrong?!


[jQuery] Re: accessing the ajax loaded content

2009-08-23 Thread kknaru

grat :P thnks so much Quang Ngo i solved it :)


[jQuery] Re: accessing the ajax loaded content

2009-08-23 Thread kknaru

hmm...can you be more specific? how should i use it? thanks


[jQuery] Re: accessing the ajax loaded content

2009-08-23 Thread kknaru

no ideas??


[jQuery] accessing the ajax loaded content

2009-08-22 Thread kknaru

so guys..what i'm trying to do is to acces the content loaded via AJAX
but in an other way than by a callback function.

i have  a div where the data will be loaded via ajax, the data is
represented by a list of folders and when i click one of them i want
to load then the subfolders...and so on, but if i use the callback
function this is not gonna be dynamic..cause i don;t know how deep is
gonna be the tree.

for example:

if i have this html



and after the data will be loaded will look like this:


folder_1
folder_2
folder_3


and the javascript looks like this:

$.(document).ready(function(){

$('div#loaded_data').load('action.php',{'path' :
'default_path'},function(){

 $('a').click(function
(){

 $
('div#loaded_data').load( etc etc ...loads the subfolders in the
respective folder);
  
});


  });

});


but if i do in this wayfirst time it worksso id i click folder_1 it loads the subfolders...and if i click
then on of the subfolders loaded with ajax it wont work anymore to see
the subfolders in the respective folder i hope that i made myself
clear :D

any help will be appreciated, thanks


[jQuery] Re: jquery and radio buttons

2009-08-15 Thread kknaru

SOLVED

my selector was wrong, this works fine:

$("input:radio").change(function(){

bla bla bla
});

On Aug 15, 3:00 pm, kknaru  wrote:
> hi, i have this form:
>
> 
>           
>           
>           
>            disabled="disabled"/>
>           
>
> and i'm trying to do something like this: when one of the two radio
> buttons is selected the submit button to become clickable(removing the
> disabled attribute).
>
> i tried this code but with no effect
>
> $("input:[...@name='radio_name']").change(function(){
>
>             $("input:[...@name='submit']").removeAttr("disabled");
>
> });
>
> any help will be appreciated , thanks


[jQuery] jquery and radio buttons

2009-08-15 Thread kknaru

hi, i have this form:


  
  
  
  
  

and i'm trying to do something like this: when one of the two radio
buttons is selected the submit button to become clickable(removing the
disabled attribute).

i tried this code but with no effect

$("input:[...@name='radio_name']").change(function(){

$("input:[...@name='submit']").removeAttr("disabled");

});

any help will be appreciated , thanks


[jQuery] Re: accessing iframe content

2009-07-26 Thread kknaru

after many tries i managed to solve the problem with this code:

$("#myframe").load(function(){

   $(this).contents().find("p").text();
});



[jQuery] accessing iframe content

2009-07-25 Thread kknaru

hi there, i just started working with iframes and i'm stucked :D

so...i have this code inside a html file:


 text


what i'm trying to do is to grab that paragraph text(using jquery).

by now i tried something like this:

$("#myframe").contents().find("p").html();

butwith no result :(

does anyone know the answer?