[jQuery] Re: simple query does not work

2009-04-13 Thread dongle

thank you ricardo,that was helpful.

On Apr 13, 6:42 am, Ricardo  wrote:
> .get(0) returns a DOM element, not a jQuery object, so the .css method
> doesn't exist in it. Try this:
>
> $("div#photolinks img").eq(0).css("border","5px solid black;");
> or
> $("div#photolinks img:first").css("border","5px solid black;");
>
> On Apr 12, 8:03 pm, dongle  wrote:
>
> > nop, there are too get ; one that acts like the javascript index(i)
> > method:http://docs.jquery.com/Core/get
> >  i am referring to that one, :first would not help me here.
>
> > On Apr 13, 12:57 am, Chuck Harmston  wrote:
>
> > > I'm not quite sure what you're trying to do here. The $.get() function is
> > > used to submit an HTTP GET request. See:
>
> > >http://docs.jquery.com/Ajax/jQuery.get
>
> > > Are you trying to return the first response? Try using $("div#photolinks
> > > img:first").
>
> > > Chuck Harmstonhttp://chuckharmston.com
>
> > > On Sun, Apr 12, 2009 at 5:41 PM, dongle  wrote:
>
> > > > i am making this(it does not work) :
>
> > > > $(document).ready(function(){
>
> > > >  $("div#photolinks img").get(0).css("border","5px solid black;");
>
> > > > });
>
> > > > if i do this:
>
> > > > $(document).ready(function(){
>
> > > >  $("div#photolinks img").css("border","5px solid black;");
>
> > > > });
>
> > > > it does work, whats wrong?
> > > > thanks


[jQuery] Re: simple query does not work

2009-04-12 Thread dongle

nop, there are too get ; one that acts like the javascript index(i)
method:
http://docs.jquery.com/Core/get
 i am referring to that one, :first would not help me here.


On Apr 13, 12:57 am, Chuck Harmston  wrote:
> I'm not quite sure what you're trying to do here. The $.get() function is
> used to submit an HTTP GET request. See:
>
> http://docs.jquery.com/Ajax/jQuery.get
>
> Are you trying to return the first response? Try using $("div#photolinks
> img:first").
>
> Chuck Harmstonhttp://chuckharmston.com
>
> On Sun, Apr 12, 2009 at 5:41 PM, dongle  wrote:
>
> > i am making this(it does not work) :
>
> > $(document).ready(function(){
>
> >  $("div#photolinks img").get(0).css("border","5px solid black;");
>
> > });
>
> > if i do this:
>
> > $(document).ready(function(){
>
> >  $("div#photolinks img").css("border","5px solid black;");
>
> > });
>
> > it does work, whats wrong?
> > thanks


[jQuery] simple query does not work

2009-04-12 Thread dongle

i am making this(it does not work) :

$(document).ready(function(){


  $("div#photolinks img").get(0).css("border","5px solid black;");


});

if i do this:

$(document).ready(function(){


  $("div#photolinks img").css("border","5px solid black;");


});


it does work, whats wrong?
thanks


[jQuery] Re: Help, friends!

2009-04-12 Thread dongle

google is your best friend.
bye!

On Apr 12, 1:13 am, rusllangashik  wrote:
> Hi all
>
> I need realize a tag cloud in style, how it done here - 4dle.ru
> (russian site). I khow it jQuery! Can some give me script to realize
> it? Please!


[jQuery] Re: ajax post data json - php receives only post data, no json

2009-04-12 Thread dongle

learn to make a simple ajax query before playing with jquery, to use
json data is completely senseless here

On Apr 12, 1:32 pm, mcologne  wrote:
> hi...
>
> i have a normal email form, where the user can send an email with some
> data...
>
> at first i send it with normal post (no dataType in jquery)... but it
> was difficult to handle the returning messages from php, e.g.
> validation messages or ok messages...
>
> therefor i tried dataType json... like the code below... now i con
> better handle the returning messages, but i wonder why i still get
> single post data in php ($_POST['name'], $_POST['email)'] etc and NO
> nested json!... is there something wrong with my data format?
>
> in firebug i also see only single post data... no json format when
> posting
>
> best regards
> m, cologne
>
> ##
> $.ajax({
>           type: "POST",
>           url: "/mail/process.php5",
>           data: {"name":name, "email":email, "message":message, "n":textmail,
> "i":pic},
>           dataType: "json",
>           success: function(res) {
>                   if(res.result == 1) {
>                          $('#dialog').html("WE SEND THE EMAIL" +
> res.message + "");
>                  }
>                  else if(res.result == 0) {
>                        $('#dialog').html("ERROR" + res.message + "");
>                  }


[jQuery] Re: jquery toggle class, I needed to switch class....

2009-04-12 Thread dongle

didnt you forget jQuery.fn.switchClass=function ???

On Mar 23, 7:47 pm, Eric Garside  wrote:
> Or:
>
> jQuery.fn.switchClass( a, b ){
>    var t = this.hasClass(a);
>    this.addClass( t ? b : a ).removeClass( t ? a : b );
>
> }
>
> On Mar 23, 12:35 pm, "T.J. Crowder"  wrote:
>
> > Hi,
>
> > You're creating (or worse, overwriting) global variables 'remove' and
> > 'add' there (because you haven't given the 'var' keyword, and thus are
> > creating implicit globals[1]).  The temporaries don't really buy you
> > anything anyway, perhaps simply:
>
> > jQuery.fn.switchClass = function(class1,class2) {
> >     if (this.hasClass(class1)) {
> >         this.removeClass(class1).addClass(class2);
> >     } else {
> >         this.removeClass(class2).addClass(class1);
> >     }
>
> > };
>
> > [1]http://blog.niftysnippets.org/2008/03/horror-of-implicit-globals.html
>
> > FWIW,
> > --
> > T.J. Crowder
> > tj / crowder software / com
> > Independent Software Engineer, consulting services available
>
> > On Mar 23, 1:33 pm, Artistan  wrote:
>
> > > ///
> > > ///   Switch Between Classes    ///
> > > ///
> > > jQuery.fn.switchClass = function(class1,class2) {
> > >     if(this.hasClass(class1)){
> > >         remove = class1;
> > >         add = class2;
> > >     } else {
> > >         remove = class2;
> > >         add = class1;
> > >     }
> > >     this.removeClass(remove);
> > >     this.addClass(add);
>
> > > };
>
> > > Hope this helps someone out.


[jQuery] Re: simply toggling a div that contains a flash movie

2009-04-09 Thread dongle

ok thank you.

On Apr 9, 7:45 pm, Ralph Whitbeck  wrote:
> object's don't obey traditional css layering.  You'll need to hide the
> object first then toggle your div.
>
> On Thu, Apr 9, 2009 at 12:16 PM, tetris  wrote:
>
> > hello
> > to simply toggle a div that contains a flash movie does not work in
> > firefox,the flash object does not disappear gradually, any thoughts?
> > code:
> >  
> >  $(document).ready(function(){
>
> >    $("button").click(function () {
> >      $("div").toggle("slow");
> >    });
>
> >  });
> >  
>
> > 
> > 
> >  Toggle 'em
> >  
> >   > codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/
> > swflash.cab#version=10,0,0,0"
> > width="300" height="250" id="banner"
> > align="middle">
> > 
> > 
> >  > value="best" />  > src="banner.swf" quality="best" bgcolor="#00" width="300"
> > height="250" name="banner" align="middle"
> > allowScriptAccess="sameDomain" allowFullScreen="false"
> > type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/
> > go/getflashplayer " />
> > 
> > 
>
> >