Re: [jQuery] Help needed to find image dimensions

2010-01-05 Thread John Arrowwood
It would be wonderful if I am wrong, but I don't think you can get the image
dimensions via JavaScript.  But you don't need to...

style
a.preview {
  max-width: 200px;
  max-height: 200px;
}
/style

This will force the image to fit within a 200px by 200px window without
altering the image aspect ratio.

On Mon, Jan 4, 2010 at 6:51 AM, banacan banaca...@gmail.com wrote:

 I'm using Preview.js to create image previews on hover.  The script as
 it is now displays the full size image on hover, but that is often too
 big.  I have been able to reduce the preview size by defining
 width='200px' which works fine in many cases, but when the image is
 tall and narrow a 200px wide image my be 700px tall.  So what I'm
 trying to do is determine the image dimensions and if the width is
 greater than the height, set width='200px', otherwise set
 height='200px'.  I haven't been able to figure out how to get the
 image dimensions from the wrapped set.

 Here is an excerpt of my markup:

  a href=?php echo $mainImgDir . $mainImg;  ? class=preview
 title=?php echo $mainImg; ?img src=?php echo $thumbsDir . $image;
 ? alt=?php echo $image; ? class=center //a

 Here is an excerpt of my js code:

  $(a.preview).hover(function(e){
  this.t = this.title;
  this.title = ;
  var orientation = ((this.img[src]).width() 
 (this.img[src]).height()) ? ' alt='Image preview' width ='200px' / : '
 alt='Image preview' height='200px' /);
  var c = (this.t != ) ? br/ + this.t : ;
  $(body).append(p id='preview'img src='+ this.href +
  orientation + c +/p);

 Can anyone see what I'm doing wrong?

 TIA




-- 
John Arrowwood
John (at) Irie (dash) Inc (dot) com
John (at) Arrowwood Photography (dot) com
John (at) Hanlons Razor (dot) com
--
http://www.irie-inc.com/
http://arrowwood.blogspot.com/


Re: [jQuery] vertical coverflow

2010-01-05 Thread John Arrowwood
Any idea how you intend to do the perspective shifts in pure JavaScript?
Because I do not know if it can even be done.  Maybe in a Canvas element,
but I don't know much about that.

On Mon, Jan 4, 2010 at 2:45 AM, John R rojanjo...@gmail.com wrote:

 Hi ,
 I would like to create vertical coverflow using jquery like this link

 http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/
 Please help me as soon as possible.
 Regards,
 John




-- 
John Arrowwood
John (at) Irie (dash) Inc (dot) com
John (at) Arrowwood Photography (dot) com
John (at) Hanlons Razor (dot) com
--
http://www.irie-inc.com/
http://arrowwood.blogspot.com/


Re: [jQuery] Re: simple jquery question

2010-01-05 Thread John Arrowwood
But if this code will get executed more than once (e.g. in response to user
actions), make sure you prefix it with code to remove all of the existing
options in the dropdown, otherwise it will be additive.

On Mon, Jan 4, 2010 at 5:23 AM, Karl Swedberg k...@englishrules.com wrote:

 this solution could be simplified a bit:

 $('h3.example').each(function() {
   $('#deptFilter').append( 'option' + $(this).html() + '/option' );
 });



 --Karl

 
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com




 On Jan 3, 2010, at 6:53 AM, Paul Hutson wrote:

 This will do what you want, first I assigned the elements via a
 filter :

 elements = $('h3').filter('.example');

 Then I scrolled around the items found and output them to a span for
 debugging.

 elements.each(function() {
 $('#Output').html($('#Output').html() + br + $(this).html());
 });

 Here's the entire test code :

 html
 head
  script type=text/javascript src=http://ajax.googleapis.com/ajax/
 libs/jquery/1.3/jquery.min.js/script
  script type=text/javascript
  $(document).ready(function(){
   elements = $('h3').filter('.example');
   elements.each(function() {
$('#Output').html($('#Output').html() + br + $(this).html
 ());
   });

  });
  /script
 /head
 body
  h3 class=example
   LALALA
  /h3
  h3 class=notexample
  NOT example :)
  /h3
  h3 class=example
  Blub
  /h3

  brbr
  span id=Output
  /span
 /body
 /html

 On Jan 2, 8:25 pm, jason jasona...@gmail.com wrote:

 Hey,


 was wondering if anyone could help me with a basic JQ question. Ok so

 I am trying to select each element that has a certain class on my

 page, and then use what is inside of the h3 class=example I am

 selecting to populate a drop down select box with the id of

 deptFilter. (with each result found inside of the H3, wrapped in

 option tags.) I am having trouble understanding how I actually store

 the variables found in each H3 with the class of example.


 Any help would be greatly appreciated.





-- 
John Arrowwood
John (at) Irie (dash) Inc (dot) com
John (at) Arrowwood Photography (dot) com
John (at) Hanlons Razor (dot) com
--
http://www.irie-inc.com/
http://arrowwood.blogspot.com/


[jQuery] Jquery color animation problem

2010-01-05 Thread Md. Ali Ahsan Rana
I am trying to do it:

$(this).animate({opacity:1},700);

it looks fine in firefox, but the texts getting very odd look in ie 6 and ie
7. Is there any way to fix it?

Also, i trie to change color like
$(this).animate({color:#FF},700);
and its not working. Please help...


-- 
http://ranacseruet.blogspot.com/


[jQuery] Re: Element Exact Width

2010-01-05 Thread ShenoudaB
Thanks, that solutions works fine.

thanks for your Help and Happy new year 2010

On Jan 2, 2:47 pm, Šime Vidas sime.vi...@gmail.com wrote:
 obj.html(obj.children().html());

 obj.children() selects the SPAN that we created...
 obj.childern().html(), therefore, returns all the content of the SPAN,
 which was originally the content of the P

 we want to set the content back from the SPAN to the P... so, we have
 to put the content that we selected inside the html() method ...

 obj.html (  obj.children().html()  )


[jQuery] Convert a string version of a json array to an actual json array

2010-01-05 Thread Dave
Hi

Wonder how I can convert a string to a json array.

//start code

var arrCss = [a___{'color':'red','font-weight':'bold'}, h1,h2___
{'color':'blue'}];

for(var i = 0; i  arrCss.length; i++){
   var snip = arrCss[i].split(___);
   $(snip[0]).css(snip[1]);
}

//end code


The problem is that .css() treats snip[1] as a string but I need it to
handle it as a json array.

Bad: .css({'color':'red','font-weight':'bold'});
Good: .css({'color':'red','font-weight':'bold'});

Any solution out there?

Thanks


Re: [jQuery] Announce: jQuery Tablesorter 2.0.2 Released

2010-01-05 Thread Binod K M

Hi All,

Have any one come up with the fixed header and scrollable rows with
tablesorter plugin? Please let me know !!!

Thanks in Advance
Binod

Steffan A. Cline wrote:
 
 on 3/14/08 7:17 AM, Christian Bach at christian.b...@polyester.se wrote:
 
 Hi list!
 
 I finaly got some time to work on tablesorter, here are the main changes
 in
 for version  2.0.2
 
 General
 * Added support for the new metadata plugin
 * Added support for jQuery 1.2.3
 * Added support for decimal numbers and negative and positive digits
 * Added new Minified version of tablesorter
 * Updated documentation and website with new examples
 * Removed packed version.
 
 Bug fixes
 * Sort force (Thanks to David Lynch)
 
 Get it all at http://tablesorter.com http://tablesorter.com/
 
 Enjoy!
 
 Ps. If you feel that your wish didn't come true with this release, please
 email me a patch and i will review and add it.
 
 
 
 Have you thought of or made a means of making the header in a fixed
 position
 and the rows scrollable? I like the way the Ext.js does it but for some
 reason
 I get further with jQuery than Ext.js
 
 
 Thanks
 
 Steffan
 
 ---
 T E L  6 0 2 . 7 9 3 . 0 0 1 4 | F A X  6 0 2 . 9 7 1 . 1 6 9 4
 Steffan A. Cline 
 stef...@execuchoice.net Phoenix, Az
 http://www.ExecuChoice.net  USA
 AIM : SteffanC  ICQ : 57234309
 YAHOO : Steffan_Cline   MSN : stef...@hldns.com
 GOOGLE: Steffan.Cline Lasso Partner Alliance Member
 ---
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Announce%3A-jQuery-Tablesorter-2.0.2-Released-tp16052470s27240p27026571.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



Re: [jQuery] Convert a string version of a json array to an actual json array

2010-01-05 Thread Md. Ali Ahsan Rana
for(var i = 0; i  arrCss.length; i++){
  var snip = arrCss[i].split(___);
  eval(var temp=+snip[1]);
  $(snip[0]).css(temp);
}


this may work, try it(although i didnt't try yet)


--
http://ranacseruet.blogspot.com


[jQuery] Re: Convert a string version of a json array to an actual json array

2010-01-05 Thread Dave
It worked perfectly!

Thanks a lot.

Cheers / Dave

On Jan 5, 11:53 am, Md. Ali Ahsan Rana ranacser...@gmail.com
wrote:
 for(var i = 0; i  arrCss.length; i++){
   var snip = arrCss[i].split(___);
   eval(var temp=+snip[1]);
   $(snip[0]).css(temp);

 }

 this may work, try it(although i didnt't try yet)

 --http://ranacseruet.blogspot.com


[jQuery] Re: Convert a string version of a json array to an actual json array

2010-01-05 Thread RobG


On Jan 5, 8:10 pm, Dave messedupp...@gmail.com wrote:
 Hi

 Wonder how I can convert a string to a json array.

From what you've posted below, you want to process a string and treat
parts of it as JSON objects.


 //start code

 var arrCss = [a___{'color':'red','font-weight':'bold'}, h1,h2___
 {'color':'blue'}];

Why not create it as a valid JSON object?


 for(var i = 0; i  arrCss.length; i++){
    var snip = arrCss[i].split(___);
    $(snip[0]).css(snip[1]);
 }

 //end code

 The problem is that .css() treats snip[1] as a string but I need it to
 handle it as a json array.

You don't want it to be a json[sic] array, you want parts of the
string converted to an object with properties and string values, which
might be called a JSON object. You could use:

  ...css(eval('(' + snip[1] + ')'));


A better solution might be to use a JSON object for the whole thing,
e.g.:

var xString = { +
'a':{'color':'red','font-weight':'bold'}, +
'h1,h2':{'color':'blue'} +
};

var xObj = eval('(' + xString + ')' );
for (var selector in xObj) {
  alert(xObj[selector].color); // red, blue
}

Which might be used in your posted code as:

var xObj = eval('(' + xString + ')' );
for (var selector in xObj) {
  $(selector).css(xObj[selector]);
}


 Bad: .css({'color':'red','font-weight':'bold'});
 Good: .css({'color':'red','font-weight':'bold'});


--
Rob


Re: [jQuery] Announce: jQuery Tablesorter 2.0.2 Released

2010-01-05 Thread aquaone
only with using a 2 table hack (one only shows thead, one only shows tbody)
and a linked sort trigger... it's a dumb hack but it works. if you're
looking for that kind of functionality natively, try one of the other
table/grid plugins out there.

aquaone


On Tue, Jan 5, 2010 at 02:49, Binod K M binod.e...@gmail.com wrote:


 Hi All,

 Have any one come up with the fixed header and scrollable rows with
 tablesorter plugin? Please let me know !!!

 Thanks in Advance
 Binod

 Steffan A. Cline wrote:
 
  on 3/14/08 7:17 AM, Christian Bach at christian.b...@polyester.se wrote:
 
  Hi list!
 
  I finaly got some time to work on tablesorter, here are the main changes
  in
  for version  2.0.2
 
  General
  * Added support for the new metadata plugin
  * Added support for jQuery 1.2.3
  * Added support for decimal numbers and negative and positive digits
  * Added new Minified version of tablesorter
  * Updated documentation and website with new examples
  * Removed packed version.
 
  Bug fixes
  * Sort force (Thanks to David Lynch)
 
  Get it all at http://tablesorter.com http://tablesorter.com/
 
  Enjoy!
 
  Ps. If you feel that your wish didn't come true with this release,
 please
  email me a patch and i will review and add it.
 
 
 
  Have you thought of or made a means of making the header in a fixed
  position
  and the rows scrollable? I like the way the Ext.js does it but for some
  reason
  I get further with jQuery than Ext.js
 
 
  Thanks
 
  Steffan
 
  ---
  T E L  6 0 2 . 7 9 3 . 0 0 1 4 | F A X  6 0 2 . 9 7 1 . 1 6 9 4
  Steffan A. Cline
  stef...@execuchoice.net Phoenix, Az
  http://www.ExecuChoice.net  USA
  AIM : SteffanC  ICQ : 57234309
  YAHOO : Steffan_Cline   MSN : stef...@hldns.com
  GOOGLE: Steffan.Cline Lasso Partner Alliance Member
  ---
 
 
 
 

 --
 View this message in context:
 http://old.nabble.com/Announce%3A-jQuery-Tablesorter-2.0.2-Released-tp16052470s27240p27026571.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] How to append a ul li to line of orphan text?

2010-01-05 Thread Tong
Hi,

I have the following HTML:

div id=text
  strongSome Text Here/strong: More Text Herebr /
  strongSome Text Here/strong: More Text Herebr /
  strongSome Text Here/strong: More Text Herebr /
/div

How could I use jQuery to wrap each line of text in a li and remove
all the br / and finally wrap all the li in a ul?

Example:

div id=text
  ul
listrongSome Text Here/strong: More Text Here/li
listrongSome Text Here/strong: More Text Here/li
listrongSome Text Here/strong: More Text Here/li
  /ul
/div


[jQuery] Re: How to retrieve the selected cells

2010-01-05 Thread Kanpan
What you know is that you're assigning classes to the selected cells.
Your best bet is to detect an onclick event on your button and then
loop through the td elements with the class sel and get each of
their value. Then take those values and submit them via ajax to your
php script.

Something like...

$(#MyBtn).click(function() {
 var values;
 $(.sel).each(function() {
  values += $(this).html()+,;
 }):
 $.ajax({
  ...
 });
});


On Jan 4, 10:11 pm, MT matt.tha...@gmail.com wrote:
 Hi all,

 I am new to jQuery and I would like to process a matrix operation
 using PHP.
 The front-end code is done bellow, its a 3x3 table. the user could
 select/deselect individual cells of the table and click the button
 that calls a PHP script that will run some function.

 1) How do I know if a cell is selected? Is there is is_selected( )
 function in jQuery?
 2) Would it be possible to send a 3x3 array to my PHP script?

 Please provide me with any info on this. Thanks!

 MT

 My current test code.
 --- 
 -
 htmlheadtitleTest/title
 script type='text/javascript'
 src='http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js'/
 script

 script type=text/javascript
 $(document).ready(function() {
     $(td).toggle(
         function () { $(this).addClass(sel); },
         function () { $(this).removeClass(sel); }
      );

 });

 /script
   style
       .sel { background-color:red; }
    /style

 /headbody

 table border=5 cellspace=10
 trtd1/tdtd2/tdtd3/td/tr
 trtd4/tdtd5/tdtd6/td/tr
 trtd7/tdtd8/tdtd9/td/tr
 /table

 buttonClick here to process the selection with a php script/button

 /body/html
 --- 
 -


[jQuery] Jqury CoverFlow

2010-01-05 Thread Zamir Jan Hui
Hi friends.
I am appreciating your kind help for happening it, the Vertical
coverFlow with Jquery.
Here is a example how it is working on Flex for horizontal coverFlow.
http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/
I needs like this on Jquery but it should be vertically

Regards
Zamir Jan Hui



[jQuery] Re: Superfish: drop down slide down / slide up effect - how to?

2010-01-05 Thread Angel
I got it, here it's how my code looks like:

 $(ul.menu).supersubs({
minWidth:10,   // minimum width of sub-menus in em
units
maxWidth:25,   // maximum width of sub-menus in em
units
extraWidth:  1 // extra width can ensure lines don't
sometimes turn over
}).superfish({
animation: {height:'show'},   // slide-down effect without
fade-in
delay: 500   // 1.2 second delay on
mouseout
});


It was the animation: {height:'show'}, that did the trick.

On 15 dez 2009, 02:16, Photonomad club...@gmail.com wrote:
 I am also interested in this! Unfortunately, I haven't been able to
 find a solution. Anyone out there know how to modify Superfish so that
 the submenu will slide back up on mouseout?

 On Dec 3, 7:23 pm, Dasher sea...@gocreate.com.au wrote: Hello,

  I have just discovered superfish - it is awesome - the jquery
  interaction is great.

  Is it possible to have the superfish drop down items slide down and
  slide up like the menu on this 
  page?http://spicebrains.com/multi-level-drop-down-menu/#examples

  I really love that effect and have seen it on a number of sites before
  and always thought it looked cool.

  My current menu seems to show and hide the drop down items and uses
  the following code.

          $('ul.sf-menu').superfish({
              delay:       1000,
              animation:   {opacity:'show',height:'show'},
              speed:       100,
              autoArrows:  true,
              dropShadows: true
                          });

  Thanks in advance.


[jQuery] blockUI for all buttons and a tags

2010-01-05 Thread mpgjunky
Hi,

I have implemented blockUI for all buttons and a tags, using a custom
message as shown:

script type=\text/javascript\
$.unblockUI();

$(document).ready(function() {
$.unblockUI();
$(':button, a').click(function() {
$.blockUI({ message: \h1img 
src='images/ajax-loader.gif' /
Just a moment...\/h1\ });
});
 });
 /script

My a tags are normal, like a href='somefile.php'.

Clicking on any button or a tag works with exception of the
following:

1. In FF the cursor remains as 'wait' after the page has unblocked.
The cursor returns to 'default' as soon as the mouse is moved.
2. In Google Chrome the spinning loading image does not show at all (I
assume because the page loads too fast). In FF the loading image
displays but the animation is choppy.

How can I fix the above so all buttons, a tags etc do proper page
blocking?
And just to clarify, is page blocking meant to be used exclusively
using ajax calls for it to work properly?

Thanks,
Michael.


[jQuery] retrieving textnode?

2010-01-05 Thread bundy
Hi, I'm new to jQuery, finding feet.

I want to be able to say, if the text node of a certain child
consists of certain string, do this with its css.

Gotten as far as changing the css of all the children, thus:

$(document).ready(function(){
 $(div  p::nth-child(6).css(color, red);
  });

but

$(document).ready(function(){
 $(div  p::nth-child(6).textNode(_ _).css(color, red);
  });
doesn't do it. Nor does textNode=...

Second question,  Firefox error console isn't muchhelp in interpreting
the error. Any suggestion for debugging?


[jQuery] $.post() can't work in IE7, but work in IE8

2010-01-05 Thread Tuba
Hey All,

I wrote code below:

$('a[rel*=showapformdata]').click(function(){
$.post(ajax/ajaxapform.php,{op: personalData, id: $
(this).attr(title)},
function(data){
$(#resultbox).hide();
$(#apformbox #tab1).html(data);
$(#apformbox).fadeIn(400);
},html);
return false;
});

when I click the button, #apformbox doesn't show anything in IE7, but
work fine in IE8/FF/Chrome;
Can anyone see what I'm doing wrong?

sorry for my poor english.


[jQuery] Re: Help needed to find image dimensions

2010-01-05 Thread devilmike
I believe John is correct on both counts. You can't get the image
dimensions before loading the image and the css method will work
unless you have to support versions of IE lower than 7.

 In any case this script should work. To prevent seeing the full size
image before it resizes, hide the preview image with css and then show
it at the end of the hover on function.

$(a.preview).hover(
function(){
 var imgSrc = this.title;
 $(body).append('p id=previewimg src='+ imgSrc + ' alt=Image
preview/p');
var preImg = $('#preview img');

  if (preImg.width()  preImg.height()){
  preImg.width(200)
  }
  else{
  preImg.height(200)
  }
 },
 function(){}
 )


Michael



On Jan 5, 3:11 am, John Arrowwood jarro...@gmail.com wrote:
 It would be wonderful if I am wrong, but I don't think you can get the image
 dimensions via JavaScript.  But you don't need to...

 style
 a.preview {
   max-width: 200px;
   max-height: 200px;}

 /style

 This will force the image to fit within a 200px by 200px window without
 altering the image aspect ratio.



 On Mon, Jan 4, 2010 at 6:51 AM, banacan banaca...@gmail.com wrote:
  I'm using Preview.js to create image previews on hover.  The script as
  it is now displays the full size image on hover, but that is often too
  big.  I have been able to reduce the preview size by defining
  width='200px' which works fine in many cases, but when the image is
  tall and narrow a 200px wide image my be 700px tall.  So what I'm
  trying to do is determine the image dimensions and if the width is
  greater than the height, set width='200px', otherwise set
  height='200px'.  I haven't been able to figure out how to get the
  image dimensions from the wrapped set.

  Here is an excerpt of my markup:

   a href=?php echo $mainImgDir . $mainImg;  ? class=preview
  title=?php echo $mainImg; ?img src=?php echo $thumbsDir . $image;
  ? alt=?php echo $image; ? class=center //a

  Here is an excerpt of my js code:

   $(a.preview).hover(function(e){
           this.t = this.title;
           this.title = ;
           var orientation = ((this.img[src]).width() 
  (this.img[src]).height()) ? ' alt='Image preview' width ='200px' / : '
  alt='Image preview' height='200px' /);
           var c = (this.t != ) ? br/ + this.t : ;
           $(body).append(p id='preview'img src='+ this.href +
   orientation + c +/p);

  Can anyone see what I'm doing wrong?

  TIA

 --
 John Arrowwood
 John (at) Irie (dash) Inc (dot) com
 John (at) Arrowwood Photography (dot) com
 John (at) Hanlons Razor (dot) com
 --http://www.irie-inc.com/http://arrowwood.blogspot.com/


[jQuery] Re: ajaxfileupload and additional data

2010-01-05 Thread Mean Mike
I'm not having any luck with this can someone point me in the right
direction

On Jan 4, 3:50 pm, Mean Mike mcgra...@gmail.com wrote:
 Hello all,

 I'm running this plug inhttp://www.phpletter.com/Our-Projects/AjaxFileUpload/
 and I need to send along additional post data can anyone help ?

 here is my current code

 [code]
 var obj = {};
     obj.id = id;
     obj.func = file_uploaded;
     obj.type = file;
         obj.pdata ={}
         if (loc == bigart) {
         obj.pdata.random='bigart';
                 obj.pdata.func='upload_bigart';
     } else {
         obj.pdata.random=random;
                 obj.pdata.func='upload_image';
     }

   $.ajaxFileUpload({
             url:prefix,
             secureuri: false,
             fileElementId: 'fileToUpload' + obj.id,
             data: obj.pdata,
             dataType: 'json',
             error: function(data) {
                 if (data.status == 302) {
                     top.location.href = data.getResponseHeader
 ('Location');
                 } else {
                     display_messages({
                         messages: {
                             error: invalid json response please try
 again file error: + data.error
                         }
                     });
                 }
             },
             success: function(data) {
                 display_messages(data.messages);
                 if (data.messages  data.messages.error !==
 undefined) {
                     $(#form + argObject.id).remove();
                     add_form_field();
                 } else {
                     obj.func(data, obj.id);
                 }
             }
         });
 [/code]

 thanks
 Mean Mike


[jQuery] jQuery Equivalent of Prototype Function.bind

2010-01-05 Thread Bruce
Is there a jQuery way of doing this Prototype bind?

var func = myFunction;
setTimeout(func.bind(this), 1000);

Thanks.


[jQuery] Re: blockUI for all buttons and a tags

2010-01-05 Thread elubin
#1 is a well known issue in IE (the cursor doesn't change back).  the
fix is :

$.blockUI({ message: blah blah blah

css :  {
cursor: 'default',
},
overlayCSS : {
cursor: 'default'
},
});



On Jan 5, 7:14 am, mpgjunky mich...@eurofeeds.com wrote:
 Hi,

 I have implemented blockUI for all buttons and a tags, using a custom
 message as shown:

         script type=\text/javascript\
                 $.unblockUI();

             $(document).ready(function() {
                         $.unblockUI();
                         $(':button, a').click(function() {
                                 $.blockUI({ message: \h1img 
 src='images/ajax-loader.gif' /
 Just a moment...\/h1\ });
                         });
              });
          /script

 My a tags are normal, like a href='somefile.php'.

 Clicking on any button or a tag works with exception of the
 following:

 1. In FF the cursor remains as 'wait' after the page has unblocked.
 The cursor returns to 'default' as soon as the mouse is moved.
 2. In Google Chrome the spinning loading image does not show at all (I
 assume because the page loads too fast). In FF the loading image
 displays but the animation is choppy.

 How can I fix the above so all buttons, a tags etc do proper page
 blocking?
 And just to clarify, is page blocking meant to be used exclusively
 using ajax calls for it to work properly?

 Thanks,
 Michael.


Re: [jQuery] How to append a ul li to line of orphan text?

2010-01-05 Thread brian
On Tue, Jan 5, 2010 at 1:01 AM, Tong
naateepart.premnitthip...@gmail.com wrote:
 Hi,

 I have the following HTML:

 div id=text
  strongSome Text Here/strong: More Text Herebr /
  strongSome Text Here/strong: More Text Herebr /
  strongSome Text Here/strong: More Text Herebr /
 /div

 How could I use jQuery to wrap each line of text in a li and remove
 all the br / and finally wrap all the li in a ul?

 Example:

 div id=text
  ul
    listrongSome Text Here/strong: More Text Here/li
    listrongSome Text Here/strong: More Text Here/li
    listrongSome Text Here/strong: More Text Here/li
  /ul
 /div


This seems to work but I don't know that it's the most efficient method.

$(function()
{
/* grab the text and trim leading  trailing newlines/whitespace
 */
var the_text = $.trim($('#text').html());

/* swap out newlines for closing/opening LI tags
 */
the_text = 'ulli' + the_text.replace(/\n/g, '/lili') + 
'/li/ul';

/* html() normalises the self-closing 'br /' to 'br'
 */
$('#text').html(the_text.replace(/br/g, '')); 
});


Re: [jQuery] New to JS and jQuery

2010-01-05 Thread brian
That works for me but I do see how this can be refactored:

a id=stuff class=baritem href=#stuff_menuMy Account/a

div id=stuff_menu class=SomeClass
a href=##My Account/a
a href=##More stuff/a
a href=##Here is a menu item/a
a href=##Here is a menu item/a
a href=##Here is a menu item/a
a href=##Here is a menu item/a
/div

Notice that I've changed the IDs so that the DIV has the link ID plus
some other string, rather than the other way around.

Also, I've added a class to the DIV to make it easier to set styles.
This isn't strictly necessary.

$(function()
{
/* set up the onclick handler for all links on page load
 */
$('.baritem').click(function()
{
$('#' + this.id + '_menu').toggle();
return false;
});
});

On Mon, Jan 4, 2010 at 4:01 PM, Valerij valeri...@gmail.com wrote:
 Hey guys, I'm trying to create 1 really simple function but it just
 doesn't work!

 function showMenu(menu) {
        var menuid = $( #+menu );
        var menuRoot = $( #+menu+-root );

        menuid.toggle();
        menuRoot.blur();
 }

 What this suppose to do is when you click a link, it will change
 settings of a specific div to visible
 The HTML:

 a id=stuff-root class=baritem href=javascript:void(0)
 onclick=showMenu('stuff');My Account/a
 div id=stuff
        a href=##My Account/a
        a href=##More stuff/a
        a href=##Here is a menu item/a
        a href=##Here is a menu item/a
        a href=##Here is a menu item/a
        a href=##Here is a menu item/a
 /div



 Why doesn't this work? What am I doing wrong.. When I alert this, I
 get the correct div ids?



[jQuery] Table works but not div within divs. Does jquery has an issue with divs inside divs?

2010-01-05 Thread Oliur
Hi,

I am playing with these JQuery tabs (http://www.queness.com/post/106/
jquery-tabbed-interfacetabbed-structure-menu-tutorial) and trying to
customize it.

I want to be able to place different images or text and display them
when user clicks on these tabs, make sense?

This is a working version hosted on my server:

http://www.webimpulse.co.uk/issues/cu/tabs.html

For some reason the content area of each tab doesnot display any div
elements or behave in a strange way. I've placed some table and they
are being displayed correctly. Have a look here:

http://www.webimpulse.co.uk/issues/cu/index.html

I've placed a div under the 'famous' tab, if you click on different
tabs you will understand what I mean by strange behaviour. Either it
is not displayed, or responds really late or does something when user
clicks on any of the adjacent tabs. Here is the link to test:

http://www.webimpulse.co.uk/issues/cu/index2.html

What can I do to make divs appear just like the tables do?

Thanks,



Re: [jQuery] retrieving textnode?

2010-01-05 Thread brian
CSS only operates on tagged elements. You'll have to wrap the text
node in a span (with a certain class, for example).

On Tue, Jan 5, 2010 at 2:00 AM, bundy ctil...@hinet.net.au wrote:
 Hi, I'm new to jQuery, finding feet.

 I want to be able to say, if the text node of a certain child
 consists of certain string, do this with its css.

 Gotten as far as changing the css of all the children, thus:

 $(document).ready(function(){
  $(div  p::nth-child(6).css(color, red);
  });

 but

 $(document).ready(function(){
  $(div  p::nth-child(6).textNode(_ _).css(color, red);
  });
 doesn't do it. Nor does textNode=...

 Second question,  Firefox error console isn't muchhelp in interpreting
 the error. Any suggestion for debugging?



[jQuery] Re: slideDown trouble in Safari/Chrome

2010-01-05 Thread Måns Björkman
On 4 Jan, 16:35, Paul Hutson hutsonphu...@googlemail.com wrote:
  Any ideas? Many thanks in advance.

 Without looking into it too much I can't see the cause of the
 problem...

 ... however, site design wise, would it not be better to have the
 buttons expand an area on the page to show the information?  You could
 have the divs all created prior to the page loading (much like you do
 now [as a side note here, hiding the divs in the definition would be a
 good idea as when it loads up slowly it shows them before hiding
 them]) then just using the $(#divid).show(slow); when clicking on
 them (and hiding the currently open one).

You mean, having the content divs completely separate from the
buttons? That's one solution I guess, but it would change the design
into something else. It is perhaps more conventional, but I am not
convinced that it is better by definition.

As for hiding the divs in the definition (I assume you mean the css),
I wanted to avoid that so as to assure graceful degradation. My
reasoning goes, if Javascript is used to display the divs, it should
also be used to hide the divs.


 document.getElementById(NAMEOFDIV).style.width = 10;

 I can't remember how to do it in a more jquery like way at the moment.

Without consulting the documentation I believe that corresponds to $
(#NAMEOFDIV).css(width, 10); in jQuerian :) .

Yours,
Måns


[jQuery] Change opacity of item with class of selected

2010-01-05 Thread Paul Collins
Hi all

I've been stuck on this for four hours, and I still can't solve it!

I am trying to check if a list item has a class of selected, then is so
change the opacity to 0.5. Here is my code:

if ($(#portfolio #thumbs ul li).hasClass(.selected)) {
$(this).css('opacity','0.5');
}

It seems that the this part isn't working, is it to do with putting it in
an event?

Would appreciate any help


Re: [jQuery] Change opacity of item with class of selected

2010-01-05 Thread brian
Just put the class in the selector instead of testing for it first:

$(#portfolio #thumbs li.selected).css('opacity','0.5');

If the class doesn't exist, jQuery will do nothing (instead of
throwing an undefined error or similar).

On Tue, Jan 5, 2010 at 12:45 PM, Paul Collins pauldcoll...@gmail.com wrote:
 Hi all

 I've been stuck on this for four hours, and I still can't solve it!

 I am trying to check if a list item has a class of selected, then is so
 change the opacity to 0.5. Here is my code:

     if ($(#portfolio #thumbs ul li).hasClass(.selected)) {
         $(this).css('opacity','0.5');
     }

 It seems that the this part isn't working, is it to do with putting it in
 an event?

 Would appreciate any help





[jQuery] jQuery not working on public server

2010-01-05 Thread zanm
Hi all,

My form works just fine when testing on my local machine, but when I
upload everything to the public server the form does not validate.

Any thoughts/suggestions?

Thanks in advance!

mz


[jQuery] Re: jQuery not working on public server

2010-01-05 Thread zanm
Hi everyone,

Scratch my question.  Right after I posted I found that one of my
included jQuery libriaries was missing the .js extension.  Adding this
fixed my issue.  AH...this took me a few hours to notice.  Duh!

:)

mz

On Jan 5, 1:34 pm, zanm zanfardi...@gmail.com wrote:
 Hi all,

 My form works just fine when testing on my local machine, but when I
 upload everything to the public server the form does not validate.

 Any thoughts/suggestions?

 Thanks in advance!

 mz


[jQuery] Re: jQuery not working on public server

2010-01-05 Thread zanm
Hi everyone,

Scratch my question.  Right after I posted I found that one of my
included jQuery libraries was missing the .js extension.  Adding this
fixed my issue.  AH...this took me a few hours to notice.  Duh!

:)

mz

On Jan 5, 1:34 pm, zanm zanfardi...@gmail.com wrote:
 Hi all,

 My form works just fine when testing on my local machine, but when I
 upload everything to the public server the form does not validate.

 Any thoughts/suggestions?

 Thanks in advance!

 mz


Re: [jQuery] Change opacity of item with class of selected

2010-01-05 Thread Paul Collins
Thanks very much for your help Brian. That works, but I think the problem
may go deeper than I thought! I've put up a test page.

I'm using the JQuery Opacity Rollover Script as a part of the Gallerific
plugin  http://www.twospy.com/galleriffic/#1

To try and keep this simple, when you hover over a thumbnail, it originally
went from dark to light. I've reversed the order of this in
mouseOutOpacity  mouseOverOpacity on the scripts.js 
jquery.opacityrollover.js, so now they are full opacity by default and half
when you hover over. There is a selected class applied when you click on a
thumbnail and I want to make the opacity stay at half when you click on it.

There seems to be a default on all list items of the thumbs ul of opacity:
1; I want to change it to 0.5 when an item has a class of selected, but
can't get it to work.

I've tried removing the inline style first using

$(#portfolio #thumbs li.selected).removeAttr(style);

But this doesn't work.

Sorry for the long windedness of this post, but if anyone could even give me
a hint of where to start looking, I would be really grateful.

Thanks




2010/1/5 brian zijn.digi...@gmail.com

 Just put the class in the selector instead of testing for it first:

 $(#portfolio #thumbs li.selected).css('opacity','0.5');

 If the class doesn't exist, jQuery will do nothing (instead of
 throwing an undefined error or similar).

 On Tue, Jan 5, 2010 at 12:45 PM, Paul Collins pauldcoll...@gmail.com
 wrote:
  Hi all
 
  I've been stuck on this for four hours, and I still can't solve it!
 
  I am trying to check if a list item has a class of selected, then is so
  change the opacity to 0.5. Here is my code:
 
  if ($(#portfolio #thumbs ul li).hasClass(.selected)) {
  $(this).css('opacity','0.5');
  }
 
  It seems that the this part isn't working, is it to do with putting it
 in
  an event?
 
  Would appreciate any help
 
 
 



Re: [jQuery] Change opacity of item with class of selected

2010-01-05 Thread Paul Collins
Sorry, the test page:
http://paulcollinslondon.com/test/test.html

2010/1/5 Paul Collins pauldcoll...@gmail.com

 Thanks very much for your help Brian. That works, but I think the problem
 may go deeper than I thought! I've put up a test page.

 I'm using the JQuery Opacity Rollover Script as a part of the Gallerific
 plugin  http://www.twospy.com/galleriffic/#1

 To try and keep this simple, when you hover over a thumbnail, it originally
 went from dark to light. I've reversed the order of this in
 mouseOutOpacity  mouseOverOpacity on the scripts.js 
 jquery.opacityrollover.js, so now they are full opacity by default and half
 when you hover over. There is a selected class applied when you click on a
 thumbnail and I want to make the opacity stay at half when you click on it.

 There seems to be a default on all list items of the thumbs ul of
 opacity: 1; I want to change it to 0.5 when an item has a class of selected,
 but can't get it to work.

 I've tried removing the inline style first using

 $(#portfolio #thumbs li.selected).removeAttr(style);

 But this doesn't work.

 Sorry for the long windedness of this post, but if anyone could even give
 me a hint of where to start looking, I would be really grateful.

 Thanks




 2010/1/5 brian zijn.digi...@gmail.com

 Just put the class in the selector instead of testing for it first:

 $(#portfolio #thumbs li.selected).css('opacity','0.5');

 If the class doesn't exist, jQuery will do nothing (instead of
 throwing an undefined error or similar).

 On Tue, Jan 5, 2010 at 12:45 PM, Paul Collins pauldcoll...@gmail.com
 wrote:
  Hi all
 
  I've been stuck on this for four hours, and I still can't solve it!
 
  I am trying to check if a list item has a class of selected, then is so
  change the opacity to 0.5. Here is my code:
 
  if ($(#portfolio #thumbs ul li).hasClass(.selected)) {
  $(this).css('opacity','0.5');
  }
 
  It seems that the this part isn't working, is it to do with putting it
 in
  an event?
 
  Would appreciate any help
 
 
 





[jQuery] Re: New to JS and jQuery

2010-01-05 Thread Valerij
This still wont work.. I've even tried copy your example character by
character and it still gives nothing..
I'm using this code on http://ferok.com/labs/test.html at the bottom
bar, try clicking the My Account and the menu wont pop up. I had
this working before, but I didn't have this dynamic code which I can
use to open more than just 1 tab.

The CSS:
#stuff_menu {background-color:#E8E8E8;border: 1px solid #66;bottom:
22px;display:none;left:0px;padding:5px 5px 1px 5px;position:
absolute;width:200px;}

On Jan 5, 5:03 pm, brian zijn.digi...@gmail.com wrote:
 That works for me but I do see how this can be refactored:

 a id=stuff class=baritem href=#stuff_menuMy Account/a

 div id=stuff_menu class=SomeClass
         a href=##My Account/a
         a href=##More stuff/a
         a href=##Here is a menu item/a
         a href=##Here is a menu item/a
         a href=##Here is a menu item/a
         a href=##Here is a menu item/a
 /div

 Notice that I've changed the IDs so that the DIV has the link ID plus
 some other string, rather than the other way around.

 Also, I've added a class to the DIV to make it easier to set styles.
 This isn't strictly necessary.

 $(function()
 {
         /* set up the onclick handler for all links on page load
          */
         $('.baritem').click(function()
         {
                 $('#' + this.id + '_menu').toggle();
                 return false;
         });



 });
 On Mon, Jan 4, 2010 at 4:01 PM, Valerij valeri...@gmail.com wrote:
  Hey guys, I'm trying to create 1 really simple function but it just
  doesn't work!

  function showMenu(menu) {
         var menuid = $( #+menu );
         var menuRoot = $( #+menu+-root );

         menuid.toggle();
         menuRoot.blur();
  }

  What this suppose to do is when you click a link, it will change
  settings of a specific div to visible
  The HTML:

  a id=stuff-root class=baritem href=javascript:void(0)
  onclick=showMenu('stuff');My Account/a
  div id=stuff
         a href=##My Account/a
         a href=##More stuff/a
         a href=##Here is a menu item/a
         a href=##Here is a menu item/a
         a href=##Here is a menu item/a
         a href=##Here is a menu item/a
  /div

  Why doesn't this work? What am I doing wrong.. When I alert this, I
  get the correct div ids?


[jQuery] Re: New to JS and jQuery

2010-01-05 Thread MorningZ
You should pay attention to your selectors :)

you have

$('baritem').click(function()

that looks for baritem DOM objects

but

$('#baritem').click(function()

will find div id=baritem




On Jan 5, 2:41 pm, Valerij valeri...@gmail.com wrote:
 This still wont work.. I've even tried copy your example character by
 character and it still gives nothing..
 I'm using this code onhttp://ferok.com/labs/test.htmlat the bottom
 bar, try clicking the My Account and the menu wont pop up. I had
 this working before, but I didn't have this dynamic code which I can
 use to open more than just 1 tab.

 The CSS:
 #stuff_menu {background-color:#E8E8E8;border: 1px solid #66;bottom:
 22px;display:none;left:0px;padding:5px 5px 1px 5px;position:
 absolute;width:200px;}

 On Jan 5, 5:03 pm, brian zijn.digi...@gmail.com wrote:

  That works for me but I do see how this can be refactored:

  a id=stuff class=baritem href=#stuff_menuMy Account/a

  div id=stuff_menu class=SomeClass
          a href=##My Account/a
          a href=##More stuff/a
          a href=##Here is a menu item/a
          a href=##Here is a menu item/a
          a href=##Here is a menu item/a
          a href=##Here is a menu item/a
  /div

  Notice that I've changed the IDs so that the DIV has the link ID plus
  some other string, rather than the other way around.

  Also, I've added a class to the DIV to make it easier to set styles.
  This isn't strictly necessary.

  $(function()
  {
          /* set up the onclick handler for all links on page load
           */
          $('.baritem').click(function()
          {
                  $('#' + this.id + '_menu').toggle();
                  return false;
          });

  });
  On Mon, Jan 4, 2010 at 4:01 PM, Valerij valeri...@gmail.com wrote:
   Hey guys, I'm trying to create 1 really simple function but it just
   doesn't work!

   function showMenu(menu) {
          var menuid = $( #+menu );
          var menuRoot = $( #+menu+-root );

          menuid.toggle();
          menuRoot.blur();
   }

   What this suppose to do is when you click a link, it will change
   settings of a specific div to visible
   The HTML:

   a id=stuff-root class=baritem href=javascript:void(0)
   onclick=showMenu('stuff');My Account/a
   div id=stuff
          a href=##My Account/a
          a href=##More stuff/a
          a href=##Here is a menu item/a
          a href=##Here is a menu item/a
          a href=##Here is a menu item/a
          a href=##Here is a menu item/a
   /div

   Why doesn't this work? What am I doing wrong.. When I alert this, I
   get the correct div ids?


[jQuery] How to gain reference to hyperlink that is clicked

2010-01-05 Thread CoffeeAddict

I understand that I can use the .click() method on a hyperlink element.  But
how do I know which element was clicked?  First I have to gain reference to
the hyperlink's ID.

So lets say I have a page of hyperlinks like this in view source:

...someurl  somebutton  
...someurl  somebutton  
...someurl  somebutton  
...someurl  somebutton  

when a user clicks addButton1, how do I know it's addButton1 that was
referenced so that I can now apply a .click() event on it?
-- 
View this message in context: 
http://old.nabble.com/How-to-gain-reference-to-hyperlink-that-is-clicked-tp27026713s27240p27026713.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



Re: [jQuery] How to gain reference to hyperlink that is clicked

2010-01-05 Thread Charlie Griefer
input type=button id=addButton1 class=myButton /
input type=button id=addButton2 class=myButton /

script type=text/javascript
 $(document).ready(function() {
  $('.myButton').click(function() {
   alert($(this).attr('id'));
   // alert(this.id) -- should also work
  }
 });
/script

Notice that I added a class=myButton to each button element, and set the
listener for $('.myButton').click(), which listens for a click event on any
element that matches that selector.

Within the function triggered by the click event, $(this) or this are both
references to the element that triggered the click.

On Tue, Jan 5, 2010 at 12:35 PM, CoffeeAddict dschin...@gmail.com wrote:


 I understand that I can use the .click() method on a hyperlink element.
  But
 how do I know which element was clicked?  First I have to gain reference to
 the hyperlink's ID.

 So lets say I have a page of hyperlinks like this in view source:

 ...someurl  somebutton
 ...someurl  somebutton
 ...someurl  somebutton
 ...someurl  somebutton

 when a user clicks addButton1, how do I know it's addButton1 that was
 referenced so that I can now apply a .click() event on it?
 --
 View this message in context:
 http://old.nabble.com/How-to-gain-reference-to-hyperlink-that-is-clicked-tp27026713s27240p27026713.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: How to gain reference to hyperlink that is clicked

2010-01-05 Thread Scott Sauyet
On Jan 5, 3:43 pm, Charlie Griefer charlie.grie...@gmail.com wrote:
 Within the function triggered by the click event, $(this) or this are both
 references to the element that triggered the click.

More precisely, this is a reference the to element.  $(this) is a
reference to a jQuery wrapper object containing only that element.

  -- Scott


[jQuery] highlighting

2010-01-05 Thread metalmini
Hi guys and galls,

Im not really a jquery programmer but i build lots of sites and i love
the jquery plugins that i can easily copy and paste. So anyway im
building a new site and i am using alot of jquery to emprove
usability.

So i am using a little script that scrolls easy to the a name=p1/
a html tag.

[code]

$(document).ready(function(){
  $('a[href*=#]').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^
\//,'')
 location.hostname == this.hostname) {
  var $target = $(this.hash);
  $target = $target.length  $target
  || $('[name=' + this.hash.slice(1) +']');
  if ($target.length) {
var targetOffset = $target.offset().top;
$('html,body')
.animate({scrollTop: targetOffset}, 1000);
   return false;
  }
}
  });
});

[/code]

This is not my own code, i found it. As i said im not a jquery pro.

Anyway i was wondering if it is possible to somehow highlight the div
class with a background color to make it stand out more? Something
that i can add to this little piece of code?

If there are things that i should include please let me know.

Thank you very much in advance.

Kind regards,

Michael


[jQuery] keyup() fires multiple times?

2010-01-05 Thread Keith Hughitt
Hi all,

I'm creating a method for the first time which causes some action to
happen while a key is pressed. I've noticed, however, that the 'keyup'
event which I would  normally use to determine when the key is
released is fired continually, even when the key is still being
pressed.

e.g.

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/
TR/html4/strict.dtd
html
head
titlejQuery  Keyup Test/title
script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/
jquery.js type=text/javascript/script
/head
body
script type=text/javascript
$(function () {
$(document).keydown(function (e) {
console.log(keydown);
}).keyup(function (e) {
console.log(KEYUP);
});
});
/script
/body
/html

Instead of seeing keydown, keydown...keydown, KEYUP. It
switches back and forth between the two continually. So far I've
tested the same demo in FF 3.5, 3.7 and Chrome 3.x.

Any ideas?

Thanks!


[jQuery] Add a second trigger in this function

2010-01-05 Thread Jordan
I recently implemented the Image Cross Fade Transition (http://
jqueryfordesigners.com/image-cross-fade-transition/)

It works great, and I'm hoping to add to the code to enhance the
functionality. Currently, if I hover over the image, it runs the cross
fade transition, which I would like to keep. I have another div on the
page that I would like to trigger the first instance when hovered over
as well. Is there a good way to add this?

Here's what I'm using for the first instance:

$(document).ready(function () {
$('div.tv').hover(function () {
//hover in
var div = $(' div', this);

if (div.is(':animated')) {
div.stop().fadeTo(500, 1);
} else {
div.fadeIn(250);
}
}, function () {
// hover out
var div = $(' div', this);
if (div.is(':animated')) {
div.stop().fadeTo(1000, 0);
} else {
div.fadeOut(1000);
}
});


[jQuery] PROBLEM WITH ENCODING (HEBREW - WINDOWS-1255) USING REMOTE

2010-01-05 Thread Ronny Bar-Sinay
 I'v been trying to use the remote option(ajax) and been experiencing
difficulties. It dosen't bring the Hebrew chars (i'm getting gibrish).
I put at the head of the remote page the right encoding (codepage-1255
and meta windows-1255). I dont have this problem when using the
regualer ajax method on Jquery ($.ajax) Do you know of any solution?


[jQuery] New to jQuery and JavaScript

2010-01-05 Thread jquery_newbee
Hello Group,

Does anybody know which plugin in jQuery to use when dealing with
forms with dependencies?
What I mean is that a second and third input elements are dependent on
the first input selection.
The second and third elements would probably disabled or hidden first
and will only be activated
when the first input selection is done. I want to implement this using
AJAX using data from the
database (MySQL). Any tip is highly appreciated.

Thanks.
jquery_newbee


Re: [jQuery] Re: How to gain reference to hyperlink that is clicked

2010-01-05 Thread Charlie Griefer
On Tue, Jan 5, 2010 at 1:10 PM, Scott Sauyet scott.sau...@gmail.com wrote:

 On Jan 5, 3:43 pm, Charlie Griefer charlie.grie...@gmail.com wrote:
  Within the function triggered by the click event, $(this) or this are
 both
  references to the element that triggered the click.

 More precisely, this is a reference the to element.  $(this) is a
 reference to a jQuery wrapper object containing only that element.


Aye.  Thanks for the clarification.

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: Need jQuery expert to slightly modify plugin

2010-01-05 Thread MikeTheVike
The code on that link is for jCarousel and not jCarousel Lite. I'm
sure they are similar, but since I'm not a javascript guy, I don't
know how to make it work, any ideas?



On Jan 4, 9:19 am, Liam Potter radioactiv...@gmail.com wrote:
 http://groups.google.com/group/jquery-en/browse_thread/thread/f550b94...



[jQuery] Re: New to JS and jQuery

2010-01-05 Thread Valerij
I have $('.baritem').. I thought that was to find class .baritem? As
said, Im new to jQuery so I don't know.. All I wanna do is having this
script being able to pop up (like on facebook) more than just 1 box
(Depending on which button you click, like: IF you click on a button
with ID of menu it opens menu_menu if you click stuff if opens
menu_stuff etc.. and I cant set it to just 1 ID cause then this wont
work dynamicly eg. I wont be able to run more than just 1 box with
this script as I cant set all the buttons to the same ID?

Brian got the idea, just that the script doesn't work.

On Jan 5, 9:14 pm, MorningZ morni...@gmail.com wrote:
 You should pay attention to your selectors :)

 you have

 $('baritem').click(function()

 that looks for baritem DOM objects

 but

 $('#baritem').click(function()

 will find div id=baritem

 On Jan 5, 2:41 pm, Valerij valeri...@gmail.com wrote:



  This still wont work.. I've even tried copy your example character by
  character and it still gives nothing..
  I'm using this code onhttp://ferok.com/labs/test.htmlatthe bottom
  bar, try clicking the My Account and the menu wont pop up. I had
  this working before, but I didn't have this dynamic code which I can
  use to open more than just 1 tab.

  The CSS:
  #stuff_menu {background-color:#E8E8E8;border: 1px solid #66;bottom:
  22px;display:none;left:0px;padding:5px 5px 1px 5px;position:
  absolute;width:200px;}

  On Jan 5, 5:03 pm, brian zijn.digi...@gmail.com wrote:

   That works for me but I do see how this can be refactored:

   a id=stuff class=baritem href=#stuff_menuMy Account/a

   div id=stuff_menu class=SomeClass
           a href=##My Account/a
           a href=##More stuff/a
           a href=##Here is a menu item/a
           a href=##Here is a menu item/a
           a href=##Here is a menu item/a
           a href=##Here is a menu item/a
   /div

   Notice that I've changed the IDs so that the DIV has the link ID plus
   some other string, rather than the other way around.

   Also, I've added a class to the DIV to make it easier to set styles.
   This isn't strictly necessary.

   $(function()
   {
           /* set up the onclick handler for all links on page load
            */
           $('.baritem').click(function()
           {
                   $('#' + this.id + '_menu').toggle();
                   return false;
           });

   });
   On Mon, Jan 4, 2010 at 4:01 PM, Valerij valeri...@gmail.com wrote:
Hey guys, I'm trying to create 1 really simple function but it just
doesn't work!

function showMenu(menu) {
       var menuid = $( #+menu );
       var menuRoot = $( #+menu+-root );

       menuid.toggle();
       menuRoot.blur();
}

What this suppose to do is when you click a link, it will change
settings of a specific div to visible
The HTML:

a id=stuff-root class=baritem href=javascript:void(0)
onclick=showMenu('stuff');My Account/a
div id=stuff
       a href=##My Account/a
       a href=##More stuff/a
       a href=##Here is a menu item/a
       a href=##Here is a menu item/a
       a href=##Here is a menu item/a
       a href=##Here is a menu item/a
/div

Why doesn't this work? What am I doing wrong.. When I alert this, I
get the correct div ids?


[jQuery] Re: PROBLEM WITH ENCODING (HEBREW - WINDOWS-1255) USING REMOTE

2010-01-05 Thread Dave Methvin
Ajax nearly always uses UTF-8 encoding. Can you switch to UTF-8 for
the page and server?


[jQuery] removeClass() fires before anything else in a series of functions when I need it to fire last.

2010-01-05 Thread Kinsbane
So, there's a main column of content and to the left of the main
column is an A element that is absolutely positioned.

I have an announcement system that when there's an active
announcement, a box is rendered above the main column, pushing the
main column down. However, the A element that is absolutely positioned
stays where it is.

I added code to check for an active announcement and add a class to
the A element so it'll keep it positioned alongside the left-border of
the main column.

When a user closes the announcement box, it fades out, and the main
column moves back up to fill the space - but the positioned A element
does not follow. I then added code to the function I had to fade out
the box and save a cookie to show the user had closed the active
announcement box which removed the active-announcement class I had PHP
add to the A element.
The problem is, even though the removeClass() function is last in the
series of functions, it fires first - the positioned A element moves
up to where it should be BEFORE the active announcement box fades out.

How can I change this so that the positioned A element has its class
removed after the other two things have taken place?

Here's the jQuery code I have:
[code]
$(#close-notice).click(function(){

$(#notice).fadeOut(800);
createCookie('t3d_notice', 
't3dnotice_?= $announcement['id']; ?
', 365);


$(#notice-tab).removeClass('active-notice');

}
);
[/code]


[jQuery] Re: removeClass() fires before anything else in a series of functions when I need it to fire last.

2010-01-05 Thread Kinsbane
er, jeez I'm sorry - i don't know how to format code on Google Groups :
(

On Jan 5, 2:21 pm, Kinsbane kinsb...@gmail.com wrote:
 So, there's a main column of content and to the left of the main
 column is an A element that is absolutely positioned.

 I have an announcement system that when there's an active
 announcement, a box is rendered above the main column, pushing the
 main column down. However, the A element that is absolutely positioned
 stays where it is.

 I added code to check for an active announcement and add a class to
 the A element so it'll keep it positioned alongside the left-border of
 the main column.

 When a user closes the announcement box, it fades out, and the main
 column moves back up to fill the space - but the positioned A element
 does not follow. I then added code to the function I had to fade out
 the box and save a cookie to show the user had closed the active
 announcement box which removed the active-announcement class I had PHP
 add to the A element.
 The problem is, even though the removeClass() function is last in the
 series of functions, it fires first - the positioned A element moves
 up to where it should be BEFORE the active announcement box fades out.

 How can I change this so that the positioned A element has its class
 removed after the other two things have taken place?

 Here's the jQuery code I have:
 [code]
 $(#close-notice).click(function(){

                                         $(#notice).fadeOut(800);
                                         createCookie('t3d_notice', 
 't3dnotice_?= $announcement['id']; ?

 ', 365);

                                         
 $(#notice-tab).removeClass('active-notice');

                                 }
                                 );
 [/code]


[jQuery] Re: retrieving textnode?

2010-01-05 Thread bundy
I'm trying to avoid classes and ids if possible. If I have to use them
I won't really need jQuery.

What about something like

var six = $(div  p::nth-child(6)

 and then
for (i=0; isix.length; i++) {
if (six.item(i).textNode) == _ _ ) {
six.item(i).style.color = red }
?


On Jan 6, 3:04 am, brian zijn.digi...@gmail.com wrote:
 CSS only operates on tagged elements. You'll have to wrap the text
 node in a span (with a certain class, for example).

 On Tue, Jan 5, 2010 at 2:00 AM, bundy ctil...@hinet.net.au wrote:
  Hi, I'm new to jQuery, finding feet.

  I want to be able to say, if the text node of a certain child
  consists of certain string, do this with its css.

  Gotten as far as changing the css of all the children, thus:

  $(document).ready(function(){
   $(div  p::nth-child(6).css(color, red);
   });

  but

  $(document).ready(function(){
   $(div  p::nth-child(6).textNode(_ _).css(color, red);
   });
  doesn't do it. Nor does textNode=...

  Second question,  Firefox error console isn't muchhelp in interpreting
  the error. Any suggestion for debugging?


[jQuery] Jquery Iframe problem

2010-01-05 Thread cem
Hi I want to have an upload script in a page without page refresh. I
coded the script and embedded in an iframe in my page.

Everything works fine. It uploads the file without page refresh. But I
want to show an image which says the page is loading in the iframe.
When the page is loading is there a way to make that happen I cannot
access the document.ready etc in an iframe outside the frame.


[jQuery] Re: removeClass() fires before anything else in a series of functions when I need it to fire last.

2010-01-05 Thread Johan Borestad
Hi!
This is due to that the fadeOut function is asynchronous (and that's a
good thing, otherwise the entire browser would freeze while
animating). To solve your problem you could use a callback. That's a
second parameter to the fadeOut method as a anonymous function
http://docs.jquery.com/Effects/fadeOut

$(#notice).fadeOut(800, function(){
   $(#notice-tab).removeClass('active-notice');
});

The method will now remove the active-notice class afterwards.

/ Johan


On Jan 5, 11:25 pm, Kinsbane kinsb...@gmail.com wrote:
 er, jeez I'm sorry - i don't know how to format code on Google Groups :
 (

 On Jan 5, 2:21 pm, Kinsbane kinsb...@gmail.com wrote:

  So, there's a main column of content and to the left of the main
  column is an A element that is absolutely positioned.

  I have an announcement system that when there's an active
  announcement, a box is rendered above the main column, pushing the
  main column down. However, the A element that is absolutely positioned
  stays where it is.

  I added code to check for an active announcement and add a class to
  the A element so it'll keep it positioned alongside the left-border of
  the main column.

  When a user closes the announcement box, it fades out, and the main
  column moves back up to fill the space - but the positioned A element
  does not follow. I then added code to the function I had to fade out
  the box and save a cookie to show the user had closed the active
  announcement box which removed the active-announcement class I had PHP
  add to the A element.
  The problem is, even though the removeClass() function is last in the
  series of functions, it fires first - the positioned A element moves
  up to where it should be BEFORE the active announcement box fades out.

  How can I change this so that the positioned A element has its class
  removed after the other two things have taken place?

  Here's the jQuery code I have:
  [code]
  $(#close-notice).click(function(){

                                          $(#notice).fadeOut(800);
                                          createCookie('t3d_notice', 
  't3dnotice_?= $announcement['id']; ?

  ', 365);

                                          
  $(#notice-tab).removeClass('active-notice');

                                  }
                                  );
  [/code]


[jQuery] Re: Add a second trigger in this function

2010-01-05 Thread Johan Borestad
Hi!
There are a number of nice implementations you could use for this.
Example the jQuery trigger. http://docs.jquery.com/Events/trigger
But for now, the simpliest solution is just to add another selector
like this

$('div.example, div.tv').hover( .

/ Johan

On Jan 5, 8:33 pm, Jordan jscottphil...@gmail.com wrote:
 I recently implemented the Image Cross Fade Transition (http://
 jqueryfordesigners.com/image-cross-fade-transition/)

 It works great, and I'm hoping to add to the code to enhance the
 functionality. Currently, if I hover over the image, it runs the cross
 fade transition, which I would like to keep. I have another div on the
 page that I would like to trigger the first instance when hovered over
 as well. Is there a good way to add this?

 Here's what I'm using for the first instance:

 $(document).ready(function () {
         $('div.tv').hover(function () {
                 //hover in
                 var div = $(' div', this);

                 if (div.is(':animated')) {
                         div.stop().fadeTo(500, 1);
                 } else {
                         div.fadeIn(250);
                 }
         }, function () {
                 // hover out
                 var div = $(' div', this);
                 if (div.is(':animated')) {
                         div.stop().fadeTo(1000, 0);
                 } else {
                         div.fadeOut(1000);
                 }
         });


Re: [jQuery] Re: retrieving textnode?

2010-01-05 Thread Karl Swedberg
You can't apply CSS to a text node, but you can find the text node,  
wrap it in a span, and then apply the css to that span. This should  
work:


$('div  p').contents().filter(function() {
  return this.nodeType == 3  this.nodeValue.indexOf('certain  
string')  -1;

}).wrap('span/').parent().css('color', 'red');


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jan 5, 2010, at 5:59 PM, bundy wrote:


I'm trying to avoid classes and ids if possible. If I have to use them
I won't really need jQuery.

What about something like

var six = $(div  p::nth-child(6)

and then
for (i=0; isix.length; i++) {
if (six.item(i).textNode) == _ _ ) {
six.item(i).style.color = red }
?


On Jan 6, 3:04 am, brian zijn.digi...@gmail.com wrote:

CSS only operates on tagged elements. You'll have to wrap the text
node in a span (with a certain class, for example).

On Tue, Jan 5, 2010 at 2:00 AM, bundy ctil...@hinet.net.au wrote:

Hi, I'm new to jQuery, finding feet.



I want to be able to say, if the text node of a certain child
consists of certain string, do this with its css.



Gotten as far as changing the css of all the children, thus:



$(document).ready(function(){
 $(div  p::nth-child(6).css(color, red);
 });



but



$(document).ready(function(){
 $(div  p::nth-child(6).textNode(_ _).css(color, red);
 });
doesn't do it. Nor does textNode=...


Second question,  Firefox error console isn't muchhelp in  
interpreting

the error. Any suggestion for debugging?




[jQuery] Re: Change opacity of item with class of selected

2010-01-05 Thread Johan Borestad
Hi Paul!
This is a case where you really don't even should use Javascript,
unless you're trying to do some fancy animations. Rely entirely on CSS
with a simple css-rule

#thumbs li.selected {
   filter:alpha(opacity=50);
   opacity:0.50;
}

This will also be much much faster than any other solutions.
/ Johan


On Jan 5, 7:50 pm, Paul Collins pauldcoll...@gmail.com wrote:
 Sorry, the test page:http://paulcollinslondon.com/test/test.html

 2010/1/5 Paul Collins pauldcoll...@gmail.com

  Thanks very much for your help Brian. That works, but I think the problem
  may go deeper than I thought! I've put up a test page.

  I'm using the JQuery Opacity Rollover Script as a part of the Gallerific
  plugin  http://www.twospy.com/galleriffic/#1

  To try and keep this simple, when you hover over a thumbnail, it originally
  went from dark to light. I've reversed the order of this in
  mouseOutOpacity  mouseOverOpacity on the scripts.js 
  jquery.opacityrollover.js, so now they are full opacity by default and half
  when you hover over. There is a selected class applied when you click on a
  thumbnail and I want to make the opacity stay at half when you click on it.

  There seems to be a default on all list items of the thumbs ul of
  opacity: 1; I want to change it to 0.5 when an item has a class of selected,
  but can't get it to work.

  I've tried removing the inline style first using

  $(#portfolio #thumbs li.selected).removeAttr(style);

  But this doesn't work.

  Sorry for the long windedness of this post, but if anyone could even give
  me a hint of where to start looking, I would be really grateful.

  Thanks

  2010/1/5 brian zijn.digi...@gmail.com

  Just put the class in the selector instead of testing for it first:

  $(#portfolio #thumbs li.selected).css('opacity','0.5');

  If the class doesn't exist, jQuery will do nothing (instead of
  throwing an undefined error or similar).

  On Tue, Jan 5, 2010 at 12:45 PM, Paul Collins pauldcoll...@gmail.com
  wrote:
   Hi all

   I've been stuck on this for four hours, and I still can't solve it!

   I am trying to check if a list item has a class of selected, then is so
   change the opacity to 0.5. Here is my code:

       if ($(#portfolio #thumbs ul li).hasClass(.selected)) {
           $(this).css('opacity','0.5');
       }

   It seems that the this part isn't working, is it to do with putting it
  in
   an event?

   Would appreciate any help


[jQuery] Re: Jquery color animation problem

2010-01-05 Thread Johan Borestad
Hi!
This is a known Internet Explorer bug (and a very annoying one
aswell).
Just adding a background color or image to the container element will
fix this.
/ Johan

On Jan 5, 9:43 am, Md. Ali Ahsan Rana ranacser...@gmail.com wrote:
 I am trying to do it:

 $(this).animate({opacity:1},700);

 it looks fine in firefox, but the texts getting very odd look in ie 6 and ie
 7. Is there any way to fix it?

 Also, i trie to change color like
 $(this).animate({color:#FF},700);
 and its not working. Please help...

 --http://ranacseruet.blogspot.com/


[jQuery] Re: Jquery color animation problem

2010-01-05 Thread MorningZ
I just went through looking for color animation as well

this plugin

http://plugins.jquery.com/project/color

did the trick.. works great

On Jan 5, 3:43 am, Md. Ali Ahsan Rana ranacser...@gmail.com wrote:
 I am trying to do it:

 $(this).animate({opacity:1},700);

 it looks fine in firefox, but the texts getting very odd look in ie 6 and ie
 7. Is there any way to fix it?

 Also, i trie to change color like
 $(this).animate({color:#FF},700);
 and its not working. Please help...

 --http://ranacseruet.blogspot.com/


[jQuery] Re: New to JS and jQuery

2010-01-05 Thread MorningZ
 I have $('.baritem')..

No, no you don't right now on the URL

http://ferok.com/labs/test.html

and the included js file

http://ferok.com/labs/global.js

you have

$('baritem').click(function()

i just copied and pasted that right from the JavaScript include file
just like i did on my last post  :-)

fix the selector and then go from there


As
 said, Im new to jQuery so I don't know.. All I wanna do is having this
 script being able to pop up (like on facebook) more than just 1 box
 (Depending on which button you click, like: IF you click on a button
 with ID of menu it opens menu_menu if you click stuff if opens
 menu_stuff etc.. and I cant set it to just 1 ID cause then this wont
 work dynamicly eg. I wont be able to run more than just 1 box with
 this script as I cant set all the buttons to the same ID?

 Brian got the idea, just that the script doesn't work.

 On Jan 5, 9:14 pm, MorningZ morni...@gmail.com wrote:

  You should pay attention to your selectors :)

  you have

  $('baritem').click(function()

  that looks for baritem DOM objects

  but

  $('#baritem').click(function()

  will find div id=baritem

  On Jan 5, 2:41 pm, Valerij valeri...@gmail.com wrote:

   This still wont work.. I've even tried copy your example character by
   character and it still gives nothing..
   I'm using this code onhttp://ferok.com/labs/test.htmlatthebottom
   bar, try clicking the My Account and the menu wont pop up. I had
   this working before, but I didn't have this dynamic code which I can
   use to open more than just 1 tab.

   The CSS:
   #stuff_menu {background-color:#E8E8E8;border: 1px solid #66;bottom:
   22px;display:none;left:0px;padding:5px 5px 1px 5px;position:
   absolute;width:200px;}

   On Jan 5, 5:03 pm, brian zijn.digi...@gmail.com wrote:

That works for me but I do see how this can be refactored:

a id=stuff class=baritem href=#stuff_menuMy Account/a

div id=stuff_menu class=SomeClass
        a href=##My Account/a
        a href=##More stuff/a
        a href=##Here is a menu item/a
        a href=##Here is a menu item/a
        a href=##Here is a menu item/a
        a href=##Here is a menu item/a
/div

Notice that I've changed the IDs so that the DIV has the link ID plus
some other string, rather than the other way around.

Also, I've added a class to the DIV to make it easier to set styles.
This isn't strictly necessary.

$(function()
{
        /* set up the onclick handler for all links on page load
         */
        $('.baritem').click(function()
        {
                $('#' + this.id + '_menu').toggle();
                return false;
        });

});
On Mon, Jan 4, 2010 at 4:01 PM, Valerij valeri...@gmail.com wrote:
 Hey guys, I'm trying to create 1 really simple function but it just
 doesn't work!

 function showMenu(menu) {
        var menuid = $( #+menu );
        var menuRoot = $( #+menu+-root );

        menuid.toggle();
        menuRoot.blur();
 }

 What this suppose to do is when you click a link, it will change
 settings of a specific div to visible
 The HTML:

 a id=stuff-root class=baritem href=javascript:void(0)
 onclick=showMenu('stuff');My Account/a
 div id=stuff
        a href=##My Account/a
        a href=##More stuff/a
        a href=##Here is a menu item/a
        a href=##Here is a menu item/a
        a href=##Here is a menu item/a
        a href=##Here is a menu item/a
 /div

 Why doesn't this work? What am I doing wrong.. When I alert this, I
 get the correct div ids?


[jQuery] Re: jQuery Equivalent of Prototype Function.bind

2010-01-05 Thread Johan Borestad
I'm not that good at Prototype at all, but wouldn't this be
equivalent?

setTimeout(function(){
myFunction.apply(this)
} , 1000)

/ Johan

On Jan 5, 3:43 pm, Bruce brucejin...@gmail.com wrote:
 Is there a jQuery way of doing this Prototype bind?

 var func = myFunction;
 setTimeout(func.bind(this), 1000);

 Thanks.


[jQuery] Why isn't this working as it does the other 1000 times...

2010-01-05 Thread Rick Faircloth
I've been using this over and over on other sites, now this isn't working:

 

I've got this element:

 

div class=windowOverlay/div

 

With this CSS:

 

.windowOverlay {  height:100%; position:fixed; overflow:auto; top:0; left:0;

  background-color:#000; width:100%;
z-index:20;

  opacity:0.5; filter:Alpha(Opacity=50);
}

 

And this jQuery to initially hide the overlay div:

 

script type=text/javascript

 

 $(document).ready(function() {

  $('.windowOverlay').hide();

 });

 

/script

 

Yet, the overlay div isn't being hidden.why?

 

Thanks for any feedback!

 

Rick

 

 


---

Those who hammer their guns into plows will plow for those who do not.  -
Thomas Jefferson

 



RE: [jQuery] Why isn't this working as it does the other 1000 times...

2010-01-05 Thread Rick Faircloth
Nevermind.had an included js file that referenced and overlay div and
crossed things up.doh!

 

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Tuesday, January 05, 2010 8:43 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Why isn't this working as it does the other 1000 times...

 

I've been using this over and over on other sites, now this isn't working:

 

I've got this element:

 

div class=windowOverlay/div

 

With this CSS:

 

.windowOverlay {  height:100%; position:fixed; overflow:auto; top:0; left:0;

  background-color:#000; width:100%;
z-index:20;

  opacity:0.5; filter:Alpha(Opacity=50);
}

 

And this jQuery to initially hide the overlay div:

 

script type=text/javascript

 

 $(document).ready(function() {

  $('.windowOverlay').hide();

 });

 

/script

 

Yet, the overlay div isn't being hidden.why?

 

Thanks for any feedback!

 

Rick

 

 


---

Those who hammer their guns into plows will plow for those who do not.  -
Thomas Jefferson

 



[jQuery] (autocoplete) problem with fast typers:)

2010-01-05 Thread Richard KLINDA
Hello All!

I have a problem with the autocomplete plugin, if one types fast enough
to hit enter before the autocomplete suggestions show up (which is not
hard at all), then autocomplete doesn't run the result handler (and it
definitely should), so nothing happens.

So when user types foo into the search input field, he has to wait for
the suggestions to show up, only after this he can press enter to get
the results.  Is there a workaround for that?

Thanks,
Richard


[jQuery] iTunes Style Slider

2010-01-05 Thread Matt Quackenbush
Hello,

I found an iTunes style slider/rotator that has been done in
blasphemyMooTools/blasphemy, demoed here:
http://www.outcut.de/MooFlow/example-ajax.html.  I was wondering if either
a) such a thing already existed in a jQuery plugin, or b) if there was a
jQuery master who could port it in quick fashion?  If b), please contact me
off-list and let me know how much you would charge and what the turnaround
time would be.  :-)

Thanks in advance!


[jQuery] Re: How to retrieve the selected cells

2010-01-05 Thread MT
Thanks MorningZ for that wonderful demo. I think you have nailed my
question here! Thank you so much!

On Jan 5, 12:14 am, MorningZ morni...@gmail.com wrote:
  1) How do I know if a cell is selected? Is there is is_selected( )

 function in jQuery?

 There's the :selected selector, but it's for valid form fields, not
 table cells...

 in your case, $(table td.sel) would give you all selected table
 cells

 I have no idea what your PHP looks like, but one way to gather the
 data could be:

 http://jsbin.com/areti/edit

 but that all depends on what you are looking for (just selected cell
 values? do you need position on the grid? something else?)

 On Jan 4, 10:11 pm, MT matt.tha...@gmail.com wrote:

  Hi all,

  I am new to jQuery and I would like to process a matrix operation
  using PHP.
  The front-end code is done bellow, its a 3x3 table. the user could
  select/deselect individual cells of the table and click the button
  that calls a PHP script that will run some function.

  1) How do I know if a cell is selected? Is there is is_selected( )
  function in jQuery?
  2) Would it be possible to send a 3x3 array to my PHP script?

  Please provide me with any info on this. Thanks!

  MT

  My current test code.
  
  htmlheadtitleTest/title
  script type='text/javascript'
  src='http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js'/
  script

  script type=text/javascript
  $(document).ready(function() {
      $(td).toggle(
          function () { $(this).addClass(sel); },
          function () { $(this).removeClass(sel); }
       );

  });

  /script
    style
        .sel { background-color:red; }
     /style

  /headbody

  table border=5 cellspace=10
  trtd1/tdtd2/tdtd3/td/tr
  trtd4/tdtd5/tdtd6/td/tr
  trtd7/tdtd8/tdtd9/td/tr
  /table

  buttonClick here to process the selection with a php script/button

  /body/html
  


[jQuery] Can jquery do this? font-colour

2010-01-05 Thread annie
I'm very very new to jquery so please be patient with my questions.

I have a layout that has white colored text.  When you turn images off
the text disappears because the back background is completely white.

So, with the scenario above is it possible to use jquery to do the
following:

font color is white
when user turns images off on their browser
then change font to color =black

So basically its not 'how do I change the font color' but 'how do I
detect that the user has images turned off, *then* change the font
color'

Your help would be much appreciated.

Thank-you in advance.

AnneG


[jQuery] Form submit success method not being called

2010-01-05 Thread Scott Brady
I'm having an issue using the jquery form plug-in.  The form gets
submitted just fine (I can see the response in Firebug).  However, it
looks like my success callback method isn't being called.

Here's the basic JS code for the form submit in the document.ready section.:
   // Add form binding
   var addOptions =
   {
   dataType: 'json',
   resetForm: true,
   success: processAdd
   };

   $(#addForm).ajaxForm(addOptions);

And, here's the callback function:
function processAdd(responseData, statusText)
{
alert(responseData);
}

I've tried changing the success be an inline function declaration
(success: function(responseText){ ... etc) but that didn't change it.

Would using ajaxSubmit() rather than ajaxForm() work better?  Or, is
there something I'm actually doing wrong that you can see?


-- 
-
Scott Brady


[jQuery] urgent help

2010-01-05 Thread Sugi
I am using Jquery plugins like flowplayer,fancy plugin for image and
video stuffs...It creates lot of erros with IE 6. Can any one help to
fix compatability issue with IE6? Please reply..Very urgent


[jQuery] How to unsubscribe from this group?

2010-01-05 Thread Chikkis Corner
Please unsubscribe me from this group.


[jQuery] Re: How to retrieve the selected cells

2010-01-05 Thread MT
Thanks Kanpan, with your code I know where to make the ajax call.
Combining with MorningZ's solution and your suggestion I am very
certain that I will be able to get my task done!

Thank you guys for your help!

On Jan 4, 11:55 pm, Kanpan statler.da...@gmail.com wrote:
 What you know is that you're assigning classes to the selected cells.
 Your best bet is to detect an onclick event on your button and then
 loop through the td elements with the class sel and get each of
 their value. Then take those values and submit them via ajax to your
 php script.

 Something like...

 $(#MyBtn).click(function() {
  var values;
  $(.sel).each(function() {
   values += $(this).html()+,;
  }):
  $.ajax({
   ...
  });

 });

 On Jan 4, 10:11 pm, MT matt.tha...@gmail.com wrote:

  Hi all,

  I am new to jQuery and I would like to process a matrix operation
  using PHP.
  The front-end code is done bellow, its a 3x3 table. the user could
  select/deselect individual cells of the table and click the button
  that calls a PHP script that will run some function.

  1) How do I know if a cell is selected? Is there is is_selected( )
  function in jQuery?
  2) Would it be possible to send a 3x3 array to my PHP script?

  Please provide me with any info on this. Thanks!

  MT

  My current test code.
  --- 
  -
  htmlheadtitleTest/title
  script type='text/javascript'
  src='http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js'/
  script

  script type=text/javascript
  $(document).ready(function() {
      $(td).toggle(
          function () { $(this).addClass(sel); },
          function () { $(this).removeClass(sel); }
       );

  });

  /script
    style
        .sel { background-color:red; }
     /style

  /headbody

  table border=5 cellspace=10
  trtd1/tdtd2/tdtd3/td/tr
  trtd4/tdtd5/tdtd6/td/tr
  trtd7/tdtd8/tdtd9/td/tr
  /table

  buttonClick here to process the selection with a php script/button

  /body/html
  --- 
  -


[jQuery] Re: Refresh the tooltips content

2010-01-05 Thread Next2Heaven
I'm talking about the cluetip BTW.


On Jan 5, 7:41 pm, Next2Heaven st...@next2heaven.com wrote:
 I use the tooltip in a social media site that allows users to
 mouseover a photo of another user and the tooltip will show options
 like 'Add to Friends List'.  After clicking it'd do an ajax call and
 replace that text with 'Remove from Friends List'.  That works great,
 but if I mouse away from that users photo and go back it will always
 show the starting state ('Add to Friends List').

 So I'm wondering if I shouldn't use AJAX to do that and instead
 refresh the tooltips content.  But how do you refresh the content?  Is
 that an option built in?


[jQuery] Need An Example On Parsing My XML

2010-01-05 Thread Simon
Hi there.

I need an example in parsing the following XML using jQuery:

?xml version=1.0 encoding=UTF-8 standalone=yes?
ns3:Account xmlns:ns2=http://oec.api.opsource.net/schemas/
organization .. 
ns3:userNamerdyer/ns3:userName
ns3:fullNameJoe Public/ns3:fullName
ns3:firstNameJoe/ns3:firstName
ns3:lastNamePublic/ns3:lastName
ns3:emailAddressjpublic24...@pop.net/ns3:emailAddress
ns3:orgId1831c1a9-9c03-44df-a5a4-f2a4662d6bde/ns3:orgId
ns3:roles
ns3:role
ns3:nameprimary administrator/ns3:name
/ns3:role
/ns3:roles
/ns3:Account

Essentially, I want to print out the contents of what's in
ns3:userName.


Re: [jQuery] Need An Example On Parsing My XML

2010-01-05 Thread Md. Ali Ahsan Rana
This should be done using

alert($(data).find(ns3:userName).text()).

Please try this out...(though i didn't try)

--
http://ranacseruet.blogspot.com