[jQuery] declare variable

2009-05-14 Thread runrunforest

Hi,

I see this line in a plugin

var $thisCell, $tgt = $(event.target);

does that mean:

var $thisCell = $(event.target);
var $tgt = $(event.target);


[jQuery] New inserted tag won't work with selector

2009-05-14 Thread cohq82

Is anyone aware of this problem? For example, the code below simply
just inserts new P tag below the existing P's. When I move mouse over
each of the P, I should see color change. Or when I click on new P, I
should be able to trigger the P click event. That did not happen.
Anyone knows how to fix this? This is just an example since I tried to
do something similar. Thanks

[code]!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
html
head
  script src=http://code.jquery.com/jquery-latest.js;/script

  script
  $(document).ready(function(){
$(p).click(function() {
$(p).after(pHello/p);
});

$(p).hover(function() {
$(this).css('color','red');
},
function() {
$(this).css('color','black');
});
  });
  /script
  stylep { background:yellow; }/style
/head
body
  pI would like to say: /p
/body
/html
[/code]


[jQuery] Re: .ajax GET not working correctly at webhost

2009-05-14 Thread Nahaz

Ah sorry about that.

It doesn't cause an error, it looks like it sends data because ?
nick=nick appears in your url but it does not get into the database
somehow. If you call /data.php?nick=nick it will work, it's when it's
called via $.ajax(); that the issue occurs. I havn't confirmed but it
seems to occasionally work in IE7 but not FF or Chrome.

I also tried to add cache: false and my own random generator to the
url but it won't get posted to the url, only the ?nick=nick comes
up.

I will fix public access after work so you can see the problem in
action.

On May 13, 8:01 pm, James james.gp@gmail.com wrote:
 Define what not working correctly means.
 Does it cause an error? Does the request get sent but nothing happens?
 Does the request get sent without the GET data? ... etc.

 On May 12, 12:00 pm, Nahaz pierre.christoffer...@gmail.com wrote:



  I have this snippet:

  function ajaxAdd() {
          $('form').submit(function() {
                                     var nick = document.register.nick.value;
                                     $(':submit', this).attr('value', 
  'Adding...');
                                     $(':submit', this).attr('disabled', 
  'disabled');
                                     $.ajax({
                                                    type: 'GET',
                                                    url: 'data.php',
                                                    data: 'nick=' + nick,
                                                    success: function() {
                                                            $(':submit', 
  this).removeAttr('disabled');
                                                            
  $('#status').load('output.php');
                                                            }
                                                    });
                                          });

  }

  that is sent when a very simple form (one value and button) is sent.
  The thing is, it works on my local webserver, but when I upload it to
  my webhost, it wont work. It works if add data.php?nick=Test, then the
  data will be added into my database but not when called from .ajax.- Hide 
  quoted text -

 - Show quoted text -


[jQuery] Re: Autocomplete - Problem accessing php file

2009-05-14 Thread spstieng

Progress! The main script (autosuggest) is triggering now in
Wordpress.
But now I'm having problems getting the script to locate the
get_labels.php script.

I'm using user friendly urls.
My permalink is set up to http://www.mysite.com/ %category%/%postname
%.

So if I'm reading a post called Hello World, the url would be:
http://www.mysite.com/news/hello-world.

My problem is that the script is looking for the file on this url:
http://www.mysite.com/the-path-I-define-in-script.

So if I have the following in my script: get_labels.php?json=true
the script will be looking for the file in this location:
http://www.mysite.com/get_labels.php?json=true;

And if I add /includes, I get this result:
http://www.mysite.com/includes/get_labels.php?json=true;

In Wordpress (and a few other CMS'es), I'm not allowed to directly
access a file.
So if I have a file called hello.php which echos Hello World, I will
not be able to executing it by:
http://www.mysite.com/hello.php.

I really need help on this topic :(


Best Regards
Steven


[jQuery] Re: New inserted tag won't work with selector

2009-05-14 Thread oly.yates

Try using
$(p).after($(this).clone(true));
instead of
 $(p).after(pHello/p);
Documentation for the clone function can be found here:
http://docs.jquery.com/Manipulation/clone#bool


On 14 May, 08:14, cohq82 quang...@gmail.com wrote:
 Is anyone aware of this problem? For example, the code below simply
 just inserts new P tag below the existing P's. When I move mouse over
 each of the P, I should see color change. Or when I click on new P, I
 should be able to trigger the P click event. That did not happen.
 Anyone knows how to fix this? This is just an example since I tried to
 do something similar. Thanks

 [code]!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
                     http://www.w3.org/TR/html4/loose.dtd;
 html
 head
   script src=http://code.jquery.com/jquery-latest.js;/script

   script
   $(document).ready(function(){
     $(p).click(function() {
                 $(p).after(pHello/p);
         });

         $(p).hover(function() {
                 $(this).css('color','red');
         },
         function() {
                 $(this).css('color','black');
         });
   });
   /script
   stylep { background:yellow; }/style
 /head
 body
   pI would like to say: /p
 /body
 /html
 [/code]


[jQuery] Re: Clone html and change input value

2009-05-14 Thread oly.yates

Have you tried using the .attr() or .val() functions to modify the
value of the cloned node?
var node = $(some node).clone(true).val(some value);
var node = $(some node).clone(true).attr(some attr, some value);


On 14 May, 00:13, rmfjcr rmf...@gmail.com wrote:
 Hi everybody.
 I've got a form where users can insert ingredients (name, quantity)
 for recipes. as they need more couples to store all the ingredients,
 they use the add ingredient link to obtain another couple of input
 fields. Here comes the problem: I need to increment the value of the
 hidden input field which precedes the two visible input fields.
 I kwon there is a clone function in jquery but it makes the exact
 copy. How can I use clone and modify the given html?
 Here's the code:
 Starting form...

 form action=insertIngredients.php method=post
 !-- first ingredient --
         input type=hidden name=ingr_num[] value=1 /
         label for=ingr_nameName/labelbr /
         input type=text name=ingr_name[] /br /

         label for=ingr_qtyQty/labelbr /
         input type=text name=ingr_qty[] /br /

         input class=submit type=submit value=Insert
 Ingredients /
 /form

 I want to obtain this...

 form action=insertIngredients.php method=post
 !-- first ingredient --
         input type=hidden name=ingr_num[] value=1 /

         label for=ingr_nameName/labelbr /
         input type=text name=ingr_name[] /br /

         label for=ingr_qtyQty/labelbr /
         input type=text name=ingr_qty[] /br /

 !-- second ingredient --
         input type=hidden name=ingr_num[] value=2 /

         label for=ingr_nameName/labelbr /
         input type=text name=ingr_name[] /br /

         label for=ingr_qtyQty/labelbr /
         input type=text name=ingr_qty[] /br /

 !-- third ingredient --
         input type=hidden name=ingr_num[] value=3 /

         label for=ingr_nameName/labelbr /
         input type=text name=ingr_name[] /br /

         label for=ingr_qtyQty/labelbr /
         input type=text name=ingr_qty[] /br /

         input class=submit type=submit value=Insert
 Ingredients /
 /form

 Any suggestion would be appreciated.
 Thanks.


[jQuery] Re: Superfish with multicolumn sub navigation

2009-05-14 Thread Ischa Gast

 Have you taken a look at 
 http://users.tpg.com.au/j_birch/plugins/superfish/#getting-started

Yes I looked at it but I can't find an example with a div that has to show.

 or tried only using lists with more complex CSS rather than div's?

I need to use that div element because of the complex columns design


[jQuery] Re: Autocomplete - Problem accessing php file

2009-05-14 Thread spstieng

It's so fun answering my own posts :)

Well, I have dug out this:
http://ryanpharis.com/2008/10/ajax-for-wordpress-plugins-using-jquery/
http://amiworks.co.in/talk/simplified-ajax-for-wordpress-plugin-developers-using-jquery/

I will give this a go and see how I progress.




[jQuery] Re: Problems with rounded corners plugin

2009-05-14 Thread RCT_Nitro

It is my understanding that the pageLoad gets called when the aspx
page is loaded...

On May 13, 9:59 pm, Mike Alsup mal...@gmail.com wrote:
  Attached is my page code, I'm trying to make the corners rounded on
  the div div#LoginArea - but try as I may I'm not able to work out why
  this won't work - would be grateful for thought on what I've done
  wrong...
      script type=text/javascript
          function pageLoad() {
              $(div#LoginArea).corner();
          }
          /script

 Where does pageLoad get called?


[jQuery] Strange behaviour with wrapInner() loading data twice

2009-05-14 Thread cjhill

Good day,

I'm not sure if this is a bug with jQuery or how a browser handles the
request, so thought I would post here first instead of the bug
tracker.

The issue comes when you try and load jQuery dynamically through
creating the necessary DOM objects. Everything works fine as long as
you do not have a $(body).wrapInner(...). It seems that it reloads
the content which in effect causes the jQuery to once again be loaded.

This may sound a bit confusing so have created a quick demonstration.
(Note: You will receive 4 Javascript alerts at first)

Demonstration: http://www.chrisjhill.co.uk/lab/js_wrapinner_bug/

1. The page loads.
2. Javascript will initially trigger a click event on the button.
3. The button has a onclick event which is triggered.
4. The button fires a alert(Hello from the button) and creates the
DOM elements loading jQuery.
5. The jQuery is loaded, firing a alert(Hello from jQuery).
6. The jQuery wraps a div in the body using $(body).wrapInner
(div/div);
7. This somehow causes the button to be clicked again, triggering the
whole process once more.

Things to note:

1. You can click the button and everything works as expected.
2. This only seems to happen when you send an event to the browser to
click the button.

Any help of this would be hugely appreciated, or a way to work around
the problem. If this is indeed a big with jQuery then I can post it on
the bug tracker.

Thanks very much,
Chris.


[jQuery] Re: Autocomplete - Problem accessing php file

2009-05-14 Thread spstieng

Alright! After about 20 hours of research, I found the answer in a
blog by Ryan Pharis (link above). As I was suspecting, it was an easy
solution.

Wordpress is using user friendly URLS. Therefore my path ended up
like this: http://www.mysite.com/includes/autosuggest.php?json=true;

The REAL path is this: 
http://www.mysite.com/wp-content/themes/my_theme/includes/autosuggest.php?json=true;

My script cannot be located in an external .js script, because I need
to get the URL from Wordpress. So I did this:
?php $site_url = bloginfo('template_url'); ?

 script type=text/javascript
var options = {
script:?php echo $site_url; ?includes/autosuggest.php?
json=true,

Now my script works and I'm a happy camper.


[jQuery] Re: Clone html and change input value

2009-05-14 Thread rmfjcr

Thanks oly.yates,
your code is a good start.
I'll give it a try and post my results.

Soon.

On 14 Mag, 08:51, oly.yates oly.ya...@googlemail.com wrote:
 Have you tried using the .attr() or .val() functions to modify the
 value of the cloned node?
 var node = $(some node).clone(true).val(some value);
 var node = $(some node).clone(true).attr(some attr, some value);

 On 14 May, 00:13, rmfjcr rmf...@gmail.com wrote:

  Hi everybody.
  I've got a form where users can insert ingredients (name, quantity)
  for recipes. as they need more couples to store all the ingredients,
  they use the add ingredient link to obtain another couple of input
  fields. Here comes the problem: I need to increment the value of the
  hidden input field which precedes the two visible input fields.
  I kwon there is a clone function in jquery but it makes the exact
  copy. How can I use clone and modify the given html?
  Here's the code:
  Starting form...

  form action=insertIngredients.php method=post
  !-- first ingredient --
          input type=hidden name=ingr_num[] value=1 /
          label for=ingr_nameName/labelbr /
          input type=text name=ingr_name[] /br /

          label for=ingr_qtyQty/labelbr /
          input type=text name=ingr_qty[] /br /

          input class=submit type=submit value=Insert
  Ingredients /
  /form

  I want to obtain this...

  form action=insertIngredients.php method=post
  !-- first ingredient --
          input type=hidden name=ingr_num[] value=1 /

          label for=ingr_nameName/labelbr /
          input type=text name=ingr_name[] /br /

          label for=ingr_qtyQty/labelbr /
          input type=text name=ingr_qty[] /br /

  !-- second ingredient --
          input type=hidden name=ingr_num[] value=2 /

          label for=ingr_nameName/labelbr /
          input type=text name=ingr_name[] /br /

          label for=ingr_qtyQty/labelbr /
          input type=text name=ingr_qty[] /br /

  !-- third ingredient --
          input type=hidden name=ingr_num[] value=3 /

          label for=ingr_nameName/labelbr /
          input type=text name=ingr_name[] /br /

          label for=ingr_qtyQty/labelbr /
          input type=text name=ingr_qty[] /br /

          input class=submit type=submit value=Insert
  Ingredients /
  /form

  Any suggestion would be appreciated.
  Thanks.


[jQuery] JQuery beginner's question on slider values

2009-05-14 Thread digitalaspect

I need to pass the value of a slider to a form.  I am trying to use
#input type=hidden id=my_input / #

I tried altField as per the datepicker, but that doesn't work.  Have
tried to get a function working, but to no avail.


#$(#target_div_id).slider({ min: 100, max: 500,
#   function() {
#   $('#my_input').value( $(#target_div_id).slider.value() );
#   } });
#
Can anyone help me get off the ground on this one?



[jQuery] Problem with animation queue

2009-05-14 Thread ad

Hi there,
I want to fire up a bunch of animations on a single click in a strict
order. Unfortunately it doesn't work every time.


Here is my code:


$(#title02).click(
function () {  // the first 3 events should occur together, NOT 
one
after another
$('#pic0').attr(src, '/images/pic3.jpg');
$(#moreInfoContainer).animate({opacity: 0.0}, 500 );
$(#pic1).animate({opacity: 0.0}, 1200,

function() {// this function shouldn't 
start bevore ALL THREE
events before have finished. the next three should occur together
again

$(#moreInfoContainer).css(height,150);
$(#moreInfoText).html(some text);
$('#pic1').attr(src, 
'/images/bild3.jpg').load(

function() {
$('#pic1').animate({opacity: 
1.0}, 500,

function() {

$(#moreInfoContainer).animate({opacity: 0.85}, 800);
});
});
});
});

sometimes it works, sometimes soem animations like $
(#moreInfoContainer).animate({opacity: 0.0}, 500 ); (the second one)
occur after almost everything else. How do I get a strict order, so
that some events occur together, and other functions are hold until
everything from before have ended?

I really hope you get my point. Sorry fpr my bad english though ;)

thanks in advance
andy


[jQuery] validate - send the submit button

2009-05-14 Thread rousseau.fra...@gmail.com

Hello and congratulations for your work.

When there are different submit buttons on the form, how to know which
button submitted the form if submitHandler function is use ?

For in this case it seems that the name of the submit button is not
sent in the form.


[jQuery] styling in javascript block vs .css file

2009-05-14 Thread James

I was wondering if someone could shed some light on some interesting
behavior I'm running into.

I'm following a very simple jQuery example in order to set up an
activity / busy indicator, as seen in the following page:

http://skfox.com/jqExamples/AjaxActivity.html

There is a simple gif that loads whenever an asynchronous event is
kicked off. (good to go there)

The jQuery code is very straight forward.

// prepare the form when the DOM is ready
$(document).ready(function() {
// Setup the ajax indicator
$(body).append('div id=ajaxBusypimg
src=images/loading.gif/p/div');
$('#ajaxBusy').css({
display:none,
margin:0px,
paddingLeft:0px,
paddingRight:0px,
paddingTop:0px,
paddingBottom:0px,
position:absolute,
right:3px,
top:3px,
width:auto
});

// Ajax activity indicator bound
// to ajax start/stop document events
$(document).ajaxStart(function(){
$('#ajaxBusy').show();
}).ajaxStop(function(){
$('#ajaxBusy').hide();
});

  // blah blah

});
});

I wanted to clean the code up a bit and move the CSS stuff into my
.css file, along with put the actual HTML code ('div
id=ajaxBusypimg src=images/loading.gif/p/div') into my
HTML template.

When I do this, however, the .gif appears on the page wherever I drop
the div id... code.

Some questions below.

(a) why does the indicator appear at all if I have the styling in the
.css file and the div id... code in the HTML file? The styling ID
indicates that the gif should be hidden.

(b) why does putting the CSS + HTML inside of the Javascript result in
the gif appear in the upper right hand corner (as it should)?

(c) is it good practice to put HTML + CSS in the Javascript block?

I realize that the CSS + HTML is only being appended to the DOM
*after* the DOM has fully loaded when I place the code in the
Javascript block. I don't see, however, how this makes a difference.

Thoughts? Ideas?

-j


[jQuery] Re: New Plugin with IE problem

2009-05-14 Thread sebastien creme

Dynamic colspan setted via style property seems not work on IE.

You can try this : td.colSpan which is used in msdn samples
(oCell.colSpan = 4) : 
http://msdn.microsoft.com/en-us/library/ms532998%28VS.85%29.aspx

sebastien

On May 13, 3:21 pm, floepi flo...@gmail.com wrote:
 Anyone??

 Still can't get it to work and don't know why IE is complaining.

 Any help appreciated.

 Cheers

 On May 7, 2:54 pm, floepi flo...@gmail.com wrote:

  Hi all,

  I mainly work in Firefox land and don't have to bother with IE much
  (Lucky me). I wanted to share one of my plugins with the public and
  therefore need to make it work across all browsers.

  The problem I am having is that even though I set a colspan for a td,
  IE does not render it properly. The attribute gets added dynamically
  using jQuery and on all other browsers it works fine.

  Please have a look at

 http://bit.ly/ONgXz

  I looked around and couldn't find a similar plugin so I thought I'd
  share it.

  Please let me know if you have any feedback. Would be good to have
  someone with a little more JS knowledge look over it than just me :)

  Cheers

  Phil


[jQuery] Custom Attributes with Integer values?

2009-05-14 Thread Daniel Murker

Hello,

I have a form containing a list of checkboxes each with an 'amount'
attribute.  These checkboxes are in no particular order, and all have
different values for the amount attribute.  Example:

input type='checkbox' amount='5' name='testName[]'  class='testClass'
input type='checkbox' amount='14' name='testName[]' class='testClass2'
input type='checkbox' amount='2' name='testName[]' class='testClass'

I had hoped to use jquery to retrieve the value from the amount attribute,
subtract it from another number, and then disable any inputs of class
'puzzle' with 'amount's greater than the remaining number.

Example:

$().ready(function(){
var remaining = 15;

   $(input[amount]).click(function(){
if ( $(this).is(':checked'){
var subtract = parseInt( $(this).attr('amount') );
remaining -= subtract;
problem is here
}

});
});


for the above code, what would be the best way to then DISABLE any and all
remaining inputs with the amount attribute that have an amount attribute
value greater than the new value of the *remaining* variable?
is it even possible?

Daniel


[jQuery] chained select box

2009-05-14 Thread phusys

Hi,
I need to show 3 select box (country, state, city) with data get from
a mysql database and when a user select a value from one of the select
box the other shows chained data.
How can I do this with jquery?


(Sorry for my english :-) ).

Thanks


[jQuery] Re: declare variable

2009-05-14 Thread Richard D. Worth
Yup. See

https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Statements/Var

- Richard

On Thu, May 14, 2009 at 2:12 AM, runrunforest craigco...@gmail.com wrote:


 Hi,

 I see this line in a plugin

 var $thisCell, $tgt = $(event.target);

 does that mean:

 var $thisCell = $(event.target);
 var $tgt = $(event.target);



[jQuery] Problem with animation queue

2009-05-14 Thread ad

Hi there,
I want to fire up a bunch of animations on a single click in a strict
order. Unfortunately it doesn't work every time.


Here is my code:


$(#title02).click(
function () {  // the first 3 events should occur together, NOT 
one
after another
$('#pic0').attr(src, '/images/pic3.jpg');
$(#moreInfoContainer).animate({opacity: 0.0}, 500 );
$(#pic1).animate({opacity: 0.0}, 1200,

function() {// this function shouldn't 
start bevore ALL THREE
events before have finished. the next three should occur together
again

$(#moreInfoContainer).css(height,150);
$(#moreInfoText).html(some text);
$('#pic1').attr(src, 
'/images/bild3.jpg').load(

function() {
$('#pic1').animate({opacity: 
1.0}, 500,

function() {

$(#moreInfoContainer).animate({opacity: 0.85}, 800);
});
});
});
});

sometimes it works, sometimes soem animations like $
(#moreInfoContainer).animate({opacity: 0.0}, 500 ); (the second one)
occur after almost everything else. How do I get a strict order, so
that some events occur together, and other functions are hold until
everything from before have ended?

I really hope you get my point. Sorry fpr my bad english though  ;)

thanks in advance
andy


[jQuery] Re: JQuery beginner's question on slider values

2009-05-14 Thread Richard D. Worth
Looks like you're working with the jQuery UI Slider? If so, we'd love to
help you out over here:

http://groups.google.com/group/jquery-ui

- Richard

On Wed, May 13, 2009 at 8:59 PM, digitalaspect digitalasp...@gmail.comwrote:


 I need to pass the value of a slider to a form.  I am trying to use
 #input type=hidden id=my_input / #

 I tried altField as per the datepicker, but that doesn't work.  Have
 tried to get a function working, but to no avail.


 #$(#target_div_id).slider({ min: 100, max: 500,
 #   function() {
 #   $('#my_input').value( $(#target_div_id).slider.value() );
 #   } });
 #
 Can anyone help me get off the ground on this one?




[jQuery] Re: New inserted tag won't work with selector

2009-05-14 Thread Richard D. Worth
See

FAQ (Frequently Asked Questions): Why doesn't an event work on a new element
I've created?
http://docs.jquery.com/Frequently_Asked_Questions#Why_doesn.27t_an_event_work_on_a_new_element_I.27ve_created.3F

- Richard

On Thu, May 14, 2009 at 2:14 AM, cohq82 quang...@gmail.com wrote:


 Is anyone aware of this problem? For example, the code below simply
 just inserts new P tag below the existing P's. When I move mouse over
 each of the P, I should see color change. Or when I click on new P, I
 should be able to trigger the P click event. That did not happen.
 Anyone knows how to fix this? This is just an example since I tried to
 do something similar. Thanks

 [code]!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
 html
 head
  script src=http://code.jquery.com/jquery-latest.js;/script

  script
  $(document).ready(function(){
$(p).click(function() {
$(p).after(pHello/p);
});

$(p).hover(function() {
$(this).css('color','red');
},
function() {
$(this).css('color','black');
});
  });
  /script
  stylep { background:yellow; }/style
 /head
 body
  pI would like to say: /p
 /body
 /html
 [/code]


[jQuery] Re: JQuery beginner's question on slider values

2009-05-14 Thread oly.yates

What are you using to generate the slider?
if your using jQueryUI try somthing like:
$('.selector').slider({
   change: function(event, ui) {
  $('#my_input').val(ui.value);
   }
});



On May 14, 2:59 am, digitalaspect digitalasp...@gmail.com wrote:
 I need to pass the value of a slider to a form.  I am trying to use
 #input type=hidden id=my_input / #

 I tried altField as per the datepicker, but that doesn't work.  Have
 tried to get a function working, but to no avail.

 #    $(#target_div_id).slider({ min: 100, max: 500,
 #   function() {
 #   $('#my_input').value( $(#target_div_id).slider.value() );
 #   }     });
 #
 Can anyone help me get off the ground on this one?


[jQuery] Re: Ajax and 404 errors.

2009-05-14 Thread DisasterMan

I would recommend using a generic error alert function. This saves
having to add an error: function() to each ajax call you use.

Here is my function. It uses jQuery UI to improve the appearance of
the error announcement and allow for html formatting:

//javascript
$(document).ready(function() {
$.create('div', {'id': 'ajax_error', 'title': 'Ajax Error'}).appendTo
('body');

$('#ajax_error').dialog({
autoOpen: false,
resizable: true,
modal: true,
height: 250,
width: 450,
buttons: {
'Close': function() {
$(this).dialog('close');
$(this).html('');
}
}
});

$('#ajax_error').parent().addClass('ajax_error');

$(#ajax_error).ajaxError(function(event, request, settings){
$(this).html(strongWhile requesting page:/strongbr /\n 
em
+ settings.url + /embr /\n br /\n strongMessage:/strongbr /
\n em + request.statusText + /em);
$(this).dialog('open');
});

});
//end javascript

I include the line:
$('#ajax_error').parent().addClass('ajax_error');
So that you can style the error dialog differently to your main dialog
style, for example:

//css
.ajax_error .ui-dialog-titlebar{
background-color:#Fbb !important;
background-image:none !important;
}
//end css

This is the first one I have built, so it may be possible to improve
the feedback, and doesn't respond to thrown errors, but could easily
be adapted,


[jQuery] Re: Ajax and 404 errors.

2009-05-14 Thread DisasterMan

That should be:
myrequest.statusText
I believe...

On May 13, 3:27 pm, bhaveshphoneh...@gmail.com
bhaveshphoneh...@gmail.com wrote:
 myrequest.status



[jQuery] Re: Custom Attributes with Integer values?

2009-05-14 Thread oly.yates

Not sure this is the best way but try this:
$(this).siblings().each(function(){
if($(this).attr(amount)  remaining){ $(this).attr(disabled,
true) }
});
Hope this helps.

On May 14, 5:31 am, Daniel Murker dmur...@gmail.com wrote:
 Hello,

 I have a form containing a list of checkboxes each with an 'amount'
 attribute.  These checkboxes are in no particular order, and all have
 different values for the amount attribute.  Example:

 input type='checkbox' amount='5' name='testName[]'  class='testClass'
 input type='checkbox' amount='14' name='testName[]' class='testClass2'
 input type='checkbox' amount='2' name='testName[]' class='testClass'

 I had hoped to use jquery to retrieve the value from the amount attribute,
 subtract it from another number, and then disable any inputs of class
 'puzzle' with 'amount's greater than the remaining number.

 Example:

 $().ready(function(){
     var remaining = 15;

    $(input[amount]).click(function(){
         if ( $(this).is(':checked'){
             var subtract = parseInt( $(this).attr('amount') );
             remaining -= subtract;
             problem is here
         }

     });

 });

 for the above code, what would be the best way to then DISABLE any and all
 remaining inputs with the amount attribute that have an amount attribute
 value greater than the new value of the *remaining* variable?
 is it even possible?

 Daniel


[jQuery] Re: Custom Attributes with Integer values?

2009-05-14 Thread waseem sabjee
var ammount = parseInt( $(timestartmin).attr(ammount) );

$(this).siblings().each(

 function(){

var ammount = parseInt( $(timestartmin).attr(ammount) );


if(ammount  remaining){ $(this).attr(disabled,
 true) }
 });



On Thu, May 14, 2009 at 1:50 PM, oly.yates oly.ya...@googlemail.com wrote:


 Not sure this is the best way but try this:
 $(this).siblings().each(function(){
if($(this).attr(amount)  remaining){ $(this).attr(disabled,
 true) }
 });
 Hope this helps.

 On May 14, 5:31 am, Daniel Murker dmur...@gmail.com wrote:
  Hello,
 
  I have a form containing a list of checkboxes each with an 'amount'
  attribute.  These checkboxes are in no particular order, and all have
  different values for the amount attribute.  Example:
 
  input type='checkbox' amount='5' name='testName[]'  class='testClass'
  input type='checkbox' amount='14' name='testName[]' class='testClass2'
  input type='checkbox' amount='2' name='testName[]' class='testClass'
 
  I had hoped to use jquery to retrieve the value from the amount
 attribute,
  subtract it from another number, and then disable any inputs of class
  'puzzle' with 'amount's greater than the remaining number.
 
  Example:
 
  $().ready(function(){
  var remaining = 15;
 
 $(input[amount]).click(function(){
  if ( $(this).is(':checked'){
  var subtract = parseInt( $(this).attr('amount') );
  remaining -= subtract;
  problem is here
  }
 
  });
 
  });
 
  for the above code, what would be the best way to then DISABLE any and
 all
  remaining inputs with the amount attribute that have an amount attribute
  value greater than the new value of the *remaining* variable?
  is it even possible?
 
  Daniel


[jQuery] Browser differences in handling xml file structures?

2009-05-14 Thread Ian Piper

Hi all,

This is my first posting to this group, so I hope you will treat me  
gently.

I am having a problem with a script that I am writing and I believe it  
is centered within a piece of jQuery code. I have some code like this  
(simplified slightly):

$.get('news/testfeed.xml', function(data) {
$('record', data).each(function() {
 var $link = $('a/a')
   .attr('href', $('link', this).text())
   .text($('name', this).text());
 var $headline = $('h4/h4').append($link);


 var $summary = $('div/div')
   .addClass('summary')
   .html($('description', this).text());

 $('div/div')
   .addClass('headline')
   .append($headline)
   .append($summary)
   .appendTo($container);
   });

I am using this to read the title and description elements of an  
xml file which is the response from a RESTful request. I have put a  
simplified version of the xml file below (just one record, and removed  
the lom:classification stuff).

My problem, in a nutshell, is that the script works and displays data  
when I look at it in Safari or Firefox 2.0 (Mac). However, when I look  
at the same script running in Firefox 3 (Mac OS X or Windows) or IE7  
then nothing seems to be returned at all. I tried replacing the  
complex xml with a simple xml file like this:

 simple xml 
?xml version=1.0 encoding=UTF-8?
records
 record
 title
 Title 1
 /title
 descriptionDescription 1/description
 teaserTeaser 1/teaser
 /record
/records
 simple xml 

and this displays fine in all browsers. So my question is, why do the  
browsers have different behaviour with respect to reading complex  
elements out of xml data, and how do I get the data I need out of the  
complex xml data reliably in other browsers?

Thanks for any advice you may be able to offer.


Ian.
--

 xml 
?xml version=1.0 encoding=UTF-8?
zs:searchRetrieveResponse xmlns=http://www.mystuff.co.uk;
 xmlns:zs=http://www.loc.gov/zing/srw/; 
xmlns:diag=http://www.loc.gov/zing/srw/diagnostic/ 

 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://www.mystuff.co.uk schema/ 
content_node.xsd
 xmlns:dc=http://purl.org/dc/elements/1.1/; 
xmlns:dcterms=http://purl.org/dc/terms/ 

 xmlns:lom=http://ltsc.ieee.org/xsd/LOM;
 zs:version1.1/zs:version
 zs:numberOfRecords2319/zs:numberOfRecords
 zs:records
 zs:record
 zs:recordSchemainfo:srw/schema/1/dc-v1.1/ 
zs:recordSchema
 zs:recordPackingxml/zs:recordPacking
 zs:recordData
 srw_dc:dc xmlns:srw_dc=info:srw/schema/1/dc-schema
 lom:metaMetadata
 lom:identifier
 lom:catalogNS/lom:catalog
 lom:entry15296/lom:entry
 /lom:identifier
 /lom:metaMetadata
 teaserIntroduction to the secondary Frameworks  
section, including links to
 background on the Frameworks as well as to  
the English, mathematics, science
 and ICT sections. /teaser
 namexxx/name
 notesupdated/notes
 taggingConfidenceMedium/taggingConfidence
 dc:titleSecondary - Home Page/dc:title
 dc:descriptionIntroduction to the secondary  
Frameworks section, including
 links to background on the Frameworks as well  
as to the English,
 mathematics, science and ICT sections. / 
dc:description
 dc:identifiernsonline.org.uk~22760~15296/ 
dc:identifier
 /srw_dc:dc
 /zs:recordData
 zs:recordIdentifier15296/zs:recordIdentifier
 zs:recordPosition1/zs:recordPosition
 /zs:record
/zs:records
/zs:searchRetrieveResponse

 xml 


[jQuery] Re: jquery cycle plugin - first cycle not in correct position unless you reload the site

2009-05-14 Thread tsacre


Hello flyfisherman,

Do you have solved the issues with the solution provided by Mike ?

Thanks,

Thomas

On 14 mai, 00:16, Mike Alsup mal...@gmail.com wrote:
 2.63 is the latest version of Cycle.  And your images do not have
 width/height attributes.

 Mike

 On May 13, 5:42 pm, flyfisherman mar...@flyfisherman.ch wrote:



  Hello Mike

  I have the newest version 2.34 installed and I also gave a width und
  height for the picture id in my css-file (view source code).
  So what else could it be?
  txs
  Markus

  On 13 Mai, 23:01, Mike Alsup mal...@gmail.com wrote:

I am using the cycle plugin on a start page to cycle 5 pictures in a
div id picture. The first load of the site the pictures are shown to
small (firefox) or outside the container (opera, safari Win), after a
reload all is ok!!

I have no clue why this happens. Is there any advice?

link:http://nitidas.freelinks.ch

   Try updating to a newer version of Cycle or give your images width/
   height attributes.

   Mike- Masquer le texte des messages précédents -

 - Afficher le texte des messages précédents -


[jQuery] Re: Alternating Row Colors: Last row not coloring

2009-05-14 Thread Shadraq

Morning Z,

Ah. Ah. Ah. :) Thanks for that. It never occurred to me that that was
the case. Geeze. Thanks for explaining it so well. I appreciate it.

Spstieng,

Good tip. I believe I will implement that the next time I do this.
I've only just started dabbling in CSS here recently and still have
much to learn. Up until now I've usually just assigned specifics
inside the rows. But, as I've come to realize, that makes it much more
difficult to go back through and change coloring/theming and whatnot.

- Shadraq


[jQuery] Fairly new to animation. Hold my hand please, hehe?

2009-05-14 Thread ldexterldesign

Hey guys,

Got a little script I've written. Would like to animate the appearance
of the #sidebar2 to it's new block element state if possible ($
('#sidebar2').css('display', 'block');).

// 'get a quote!' button is clicked
$('.contactQuote').click(function(){
$('#content').css('width', '33%');

  $('#sidebar2').css('display', 'block');

$('.wpcf7').css('border', '3px solid #6ABC00');
return false;
});
$('.wpcf7 input').focus(function(){
$('.wpcf7').css('border', 'none');
});
});

What I've been experimenting with isn't working unfortunately :[

// 'get a quote!' button is clicked
$('.contactQuote').click(function(){
$('#content').css('width', '33%');

  $('#sidebar2').animate({display: block}, 1000);

$('.wpcf7').css('border', '3px solid #6ABC00');
return false;
});
$('.wpcf7 input').focus(function(){
$('.wpcf7').css('border', 'none');
});
});

Any tips?

Cheers dudes,
L


[jQuery] Re: chained select box

2009-05-14 Thread Tom Worster

On 5/14/09 3:20 AM, phusys alessio.f...@gmail.com wrote:

 I need to show 3 select box (country, state, city) with data get from
 a mysql database and when a user select a value from one of the select
 box the other shows chained data.
 How can I do this with jquery?

fill the first select before delivering the form to the user.

when the user selects from the first, use ajax to get data to use as options
in the second.

when the user selects from the second, use ajax to get data to use as
options in the third.

e.g. you could write the backend to format the data into html options and
then .load() them into the form select element.




[jQuery] Re: IE8 error: Invalid Argument

2009-05-14 Thread Shadraq

Upon further testing, I also have a div that is called. The error
appears to be happening within this:

div id=dialog-search
p id=tips-searchAt least one field must be filled in/p
form
fieldset
label for=s-firstnameFirst Name/label
input type=text name=s-firstname 
id=s-firstname class=text
ui-widget-content ui-corner-all /br /
label for=s-lastnameLast Name/label
input type=text name=s-lastname 
id=s-lastname class=text
ui-widget-content ui-corner-all /br /
/fieldset
/form
/div

The modal will pop-up if I pull out all code between and including the
fieldset/fieldset tags.

Obviously, this presents a problem. Any ideas?

Thanks,
Shadraq


[jQuery] Re: Fairly new to animation. Hold my hand please, hehe?

2009-05-14 Thread waseem sabjee
   // 'get a quote!' button is clicked
   $('.contactQuote').click(

 function(e){

   e.preventDefault();


$('#content').css({'width', '33%'});

  $('#sidebar2').css({'display', 'block'});

$('.wpcf7').css({'border', '3px solid #6ABC00'});
});
$('.wpcf7 input').focus(function(){
$('.wpcf7').css({'border', 'none'});
});
});


i fixed your current script a bit see it if works

currently you had
element.css();
i changed it to element.css({});
you had function()
i changed to function(e)
you had return false;
i changed to
e.preventDefault()

On Thu, May 14, 2009 at 3:02 PM, ldexterldesign
m...@ldexterldesign.co.ukwrote:


 Hey guys,

 Got a little script I've written. Would like to animate the appearance
 of the #sidebar2 to it's new block element state if possible ($
 ('#sidebar2').css('display', 'block');).

// 'get a quote!' button is clicked
$('.contactQuote').click(function(){
$('#content').css('width', '33%');

  $('#sidebar2').css('display', 'block');

$('.wpcf7').css('border', '3px solid #6ABC00');
return false;
});
$('.wpcf7 input').focus(function(){
$('.wpcf7').css('border', 'none');
});
});

 What I've been experimenting with isn't working unfortunately :[

// 'get a quote!' button is clicked
$('.contactQuote').click(function(){
$('#content').css('width', '33%');

  $('#sidebar2').animate({display: block}, 1000);

$('.wpcf7').css('border', '3px solid #6ABC00');
return false;
});
$('.wpcf7 input').focus(function(){
$('.wpcf7').css('border', 'none');
});
});

 Any tips?

 Cheers dudes,
 L


[jQuery] Fairly new to animation. Hold my hand please, hehe?

2009-05-14 Thread ldexterldesign

Hey guys,

Got a little script I've written. Would like to animate the appearance
of the #sidebar2 to it's new block element state if possible ($
('#sidebar2').css('display', 'block');).

// 'get a quote!' button is clicked
$('.contactQuote').click(function(){
$('#content').css('width', '33%');

  $('#sidebar2').css('display', 'block');

$('.wpcf7').css('border', '3px solid #6ABC00');
return false;
});
$('.wpcf7 input').focus(function(){
$('.wpcf7').css('border', 'none');
});
});

What I've been experimenting with isn't working unfortunately :[

// 'get a quote!' button is clicked
$('.contactQuote').click(function(){
$('#content').css('width', '33%');

  $('#sidebar2').animate({display: block}, 1000);

$('.wpcf7').css('border', '3px solid #6ABC00');
return false;
});
$('.wpcf7 input').focus(function(){
$('.wpcf7').css('border', 'none');
});
});

Any tips?

Cheers dudes,
L


[jQuery] Unsubscibe

2009-05-14 Thread Smruti Pragyan Misra
Hi,
I want to unsubscribe from this group as soon as possible .

Thanks N Regards,

Smruti  Pragyan Mishra


[jQuery] Re: jquery uploader

2009-05-14 Thread Vincent Majer


thanks for the tip.. in fact, i managed to do some nice things after 
reading carefully the js source, and mixing the two demos, queue 
management + photo upload.


But a little more documentation on the backend could make this great 
plugin more accessible... !


It's the best upload widget i've ever seen.. Really cool, powerful and 
great look.




Kyle Farris a écrit :

Use the provided blackbird plugin to debug it. I've used this plugin
and it works very well. I wouldn't be able to debug it without using
the blackbird thing and writing to my php error log like so: error_log
('failed at this point');

-Kyle

On May 12, 5:37 am, Vincent Majer v.ma...@voyagemotion.com wrote:
  

no one is using this plugin ?

Vincent Majer a écrit :



Hi,
  
I'm trying to use this plugin :
  
http://jquery.webunity.nl/jQuery.uploader/demo1
  
it's almost working.. BUT i have a problem with the backend.. I can't

find any documentation about response codes.. I found a sample_backend
but not very precise..
  
http://jQuery.webunity.nl/jQuery.uploader/js/sample_backend.phps
  
Apparently, when file upload is OK, no response at all.. And what about errors ? how to have the uploader indicates what files causes problems, and why.. ? (file too big, extension not allowed, upload problem.. )
  
thanks for this great plugin.. and any help welcome !
  


  




[jQuery] Re: New Plugin with IE problem

2009-05-14 Thread floepi

Fantastic, it works. Thanks a lot Sebastien!!

I'll bundle it all up and try to release it to jquery plugins.
Where do you normally submit your plugins to spread the word.

Cheers

Phil



On May 14, 11:17 am, sebastien creme sebastien.cr...@gmail.com
wrote:
 Dynamic colspan setted via style property seems not work on IE.

 You can try this : td.colSpan which is used in msdn samples
 (oCell.colSpan = 4) 
 :http://msdn.microsoft.com/en-us/library/ms532998%28VS.85%29.aspx

 sebastien

 On May 13, 3:21 pm,floepiflo...@gmail.com wrote:

  Anyone??

  Still can't get it to work and don't know why IE is complaining.

  Any help appreciated.

  Cheers

  On May 7, 2:54 pm,floepiflo...@gmail.com wrote:

   Hi all,

   I mainly work in Firefox land and don't have to bother with IE much
   (Lucky me). I wanted to share one of my plugins with the public and
   therefore need to make it work across all browsers.

   The problem I am having is that even though I set a colspan for a td,
   IE does not render it properly. The attribute gets added dynamically
   using jQuery and on all other browsers it works fine.

   Please have a look at

  http://bit.ly/ONgXz

   I looked around and couldn't find a similar plugin so I thought I'd
   share it.

   Please let me know if you have any feedback. Would be good to have
   someone with a little more JS knowledge look over it than just me :)

   Cheers

   Phil


[jQuery] Unsubscribe

2009-05-14 Thread Web Development



[jQuery] [autocomplete] Can I validate and update the entered value before doing the search?

2009-05-14 Thread Ulf Renman
Hi

When typing data into the autocomplete-field the list of matches is updated
at every key pressed.
Is it possible in any way to check and correct the data before doing the
match. Or could you alter the way the match is done.

The perfect example is when you have lots of users entering decimal values
into a filed. Some people uses comma and some decimal-point. So you would
like to permit both 2.23 and 2,23 to be matched against 2.23 in the list.

I have some other usecases aswell so I would really like some suggestions on
this.

I have posted a similar question here:
http://stackoverflow.com/questions/857690/how-do-i-alter-enterd-text-before-matching

Thanks
/Ulf Renman


[jQuery] jquery beginner question: defer $('x').text('change') until after $('x').animate()

2009-05-14 Thread illovich

Hi,

I'm trying to get a basic sequence of events to work:

1) User clicks a link
2) two divs (not containing the link) fade out
3) the contents of one div's text and the background properties of the
other get changed
4) both divs fade in again.

I've tried to effect this a couple of different ways, via chaining
(following an example at http://rhizohm.net/irhetoric/blog/88/default.aspx)
and just doing the things in order, and a couple other things. Nothing
seems to work, so I was hoping for some advice.

What I've been trying is here:  http://dev.illovich.com/storigraphi_sketch.html
- link two is totally broken atm.

In short, I've tried simple:

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

$('#word1').animate({ opacity: 'hide'}, { duration: 10, 
queue:
true });
 $('#story').animate({ opacity: 'hide'}, { duration: 100, 
queue:
true });


$('#story').css('background-position' , '-225px -0px');
changeText('#word','I wanted you');

 $('#story').animate({ opacity: 'show'}, { duration: 500,
queue: true });
 $('#word1').animate({ opacity: 'show'}, { duration: 
500, queue:
true });
 });
 })

and functions:

(like)

function showThem(event)
{
 $('#story').animate({ opacity: 
'show'}, 'medium');
 $('#word1').animate({ opacity: 
'show'}, 'medium');
}

function changeThem(words, dims)
{
 $('#story').css(words);
 $('#word1').text(dims);

 showThem()
}

but in every case the text changes as soon as I click the link then
all the anaimations happen smoothly.

Can anyone offer any advice on the best way to accomplish this?

Thanks.

ill




[jQuery] How to find the index of the parent of a specific element

2009-05-14 Thread Jo

My question is quite simple with an example:

div id=mymenu
 ul
  lia id=link_x href=#label X/a/li
  lia id=link_y href=#label Y/a/li
  lia id=link_z href=#label Z/a/li
  lia id=link_w href=#label W/a/li
 /ul
/div

I would like to know the index of the li tag containing the
hyperlink with id link_y : in this example, it should be 1, but if
for any reason I re-order the links, alphabetically for example, it
should become 2.

Thanks for your help!

-- J:o)


[jQuery] Re: How to find the index of the parent of a specific element

2009-05-14 Thread Abdullah Rubiyath

Hi there,

You could the following a try:

$(document).ready(function() {

var index = $(#mymenu ul li).index( $(li:has(#link_y)) );

// index will store the 'index' of li tag that has id=link_y

});


Hope this helps,

Thanks,

Abdullah.


On May 14, 8:31 am, Jo jo.arg...@gmail.com wrote:
 My question is quite simple with an example:

 div id=mymenu
  ul
   lia id=link_x href=#label X/a/li
   lia id=link_y href=#label Y/a/li
   lia id=link_z href=#label Z/a/li
   lia id=link_w href=#label W/a/li
  /ul
 /div

 I would like to know the index of the li tag containing the
 hyperlink with id link_y : in this example, it should be 1, but if
 for any reason I re-order the links, alphabetically for example, it
 should become 2.

 Thanks for your help!

 -- J:o)


[jQuery] Re: IE8 error: Invalid Argument

2009-05-14 Thread Shadraq

I ran the IE8 Dev Debugger and came across this: The error is jscript
runtime error invalid argument; and the code is elem[ name ] =
value; within my jquery-1.3.2.js file

Any help is appreciated.

Thanks,
Shadraq


[jQuery] How to display additional text along with link

2009-05-14 Thread vmrao

I would like to display file extension along with the file links on a
web page.

For example, I would like to append (pdf) next to any pdf links.

The following code works to some extent but not as I intended.
$(a[href$='.pdf']).append( ( + 'pdf' + ) );

If I use the above code, (pdf) is also underlined being part of the
link. I want (pdf) next to the link and not as part of the link.


[jQuery] Re: declare variable

2009-05-14 Thread Michael Geary
Nope.
 
This:
 
  var $thisCell, $tgt = $(event.target);

does not mean:
 
  var $thisCell = $(event.target);
  var $tgt = $(event.target);
 
After all, there's only one jQuery object being created in the first
example, and two distinct objects in the second.
 
Nor does it set both variables to the same object, like this code:
 
  var $thisCell, $tgt;
  $thisCell = $tgt = $(event.target);

What it really means is:
 
  var $thisCell;
  var $tgt = $(event.target);

-Mike



  _  

From: Richard D. Worth

Yup. See

https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Statements/Va
r

- Richard


On Thu, May 14, 2009 at 2:12 AM, runrunforest craigco...@gmail.com wrote:



Hi,

I see this line in a plugin

var $thisCell, $tgt = $(event.target);

does that mean:

var $thisCell = $(event.target);
var $tgt = $(event.target);





[jQuery] Re: How to display additional text along with link

2009-05-14 Thread brian

$(a[href$='.pdf']).after(' (pdf)');

On Thu, May 14, 2009 at 11:55 AM, vmrao maheshpav...@gmail.com wrote:

 I would like to display file extension along with the file links on a
 web page.

 For example, I would like to append (pdf) next to any pdf links.

 The following code works to some extent but not as I intended.
 $(a[href$='.pdf']).append( ( + 'pdf' + ) );

 If I use the above code, (pdf) is also underlined being part of the
 link. I want (pdf) next to the link and not as part of the link.



[jQuery] Re: jquery beginner question: defer $('x').text('change') until after $('x').animate()

2009-05-14 Thread illovich

I also tried

  $(function(){

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

 $('#story').animate({ opacity: 'hide'}, 
'fast').css
('background-position' , '-0px -302px').animate({ opacity: 'show'},
'fast');
 $('#word1').animate({ opacity: 
'hide'}, 'fast').text(I loved
you).animate({ opacity: 'show'}, 'fast');

 });
   })

And that didn't work either - even though the .text method is after
the .animate method, it still happens first.   Frustrating!


[jQuery] jquery.getJSON params not filtering

2009-05-14 Thread bradrice

I just can't seem to get getJSON to filter based upon the map I send
in.

Here is my code:

$.getJSON('funds_static_json.dot',{category:fundType},function(json)
{
dropdownSet.loadSelect(json);
}

My post in firebug looks completely right:

http://www.uakron.edu/development2/funds/funds_static_json.dot?category=526360

The json is formatted properly and passes the lint test.

However, I get the entire json back and not the filtered by my
parameter. I have over a thousand funds, but it should only pull back
about 9 bassed upon that category.

Here is my working url: 
http://www.uakron.edu/development2/funds/fund-detail_2.dot

Any help would be appreciated. I'm slamming into a wall.


[jQuery] Re: modal pop-up from inside iframe

2009-05-14 Thread Red

Unfortunitly since the Parent and child are from two different domains
it wont give me access to it and gives an error of Permission denied
to get property Window.nodeType. I should have mentioned that i tried
it in other forms and same result as well. I am not sure if it is even
do-able at this point.
But thanks for the help!

On May 13, 9:23 pm, snorkel benedect...@googlemail.com wrote:
 I am pretty new to all this, but here goes.. it seems to me you need
 to have something like
 window.parent.load  (javascript)
 you need parent because aniframeis a window

 On May 14, 12:08 am, Red tankgir...@gmail.com wrote:

  I am stuck with an issue of getting mymodalto pop up and out of the
 iframeand show on top of the parent page. I am using the jqModal and
  you seem to have answers for everything but this...

  I have a parent page, that i can not edit, with aniframethat
  contains the logic for themodal. When the themodalis triggered, it
  only shows inside of theiframeand i cant seem to get it to pop up
  over the parent window.

  This is the ultimate objective:
  OnLoad of the parent page, if something=true to pop up themodalfrom
  within theiframeto show over the parent.

  I can get it to do everything that i need it to do BUT pop up outside
  of theiframe. ...idk... i think i am just running in circles at this
  point

  SO here is the simplified code that is nested inside of the parent
 iframe it loads themodalonLoad of the page, but its inside the
 iframe... :-(

  [HTML]
  style
  .jqmWindow {display: none; position: fixed; top: 17%; left: 50%;
  width: 510px; margin-left: -300px; background-color: #FF; color:
  #333; border: 1px solid black; padding:0px 10px 10px 10px;}
  .jqmOverlay {background-color: #000;}
  /style
  script type=text/javascript
  $(window).load(function(){
          $('#dialog').jqm();
          $('#dialog').jqmShow();});

  /script
  div id=dialog class=jqmWindow
  Content ofModalwould go here.
  /div
  [/HTML]


[jQuery] Re: declare variable

2009-05-14 Thread Peter Warnock

No.  $thisCell is initialized with a null value in the current scope.

- pw

On May 13, 11:12 pm, runrunforest craigco...@gmail.com wrote:
 Hi,

 I see this line in a plugin

 var $thisCell, $tgt = $(event.target);

 does that mean:

 var $thisCell = $(event.target);
 var $tgt = $(event.target);


[jQuery] Re: jquery.getJSON params not filtering

2009-05-14 Thread Josh Nathanson

I think your params should look like this:

{ category:fundType }

In your code, you are passing a string rather than a javascript object
literal.

-- Josh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of bradrice
Sent: Thursday, May 14, 2009 9:38 AM
To: jQuery (English)
Subject: [jQuery] jquery.getJSON params not filtering


I just can't seem to get getJSON to filter based upon the map I send
in.

Here is my code:

$.getJSON('funds_static_json.dot',{category:fundType},function(json)
{
dropdownSet.loadSelect(json);
}

My post in firebug looks completely right:

http://www.uakron.edu/development2/funds/funds_static_json.dot?category=5263
60

The json is formatted properly and passes the lint test.

However, I get the entire json back and not the filtered by my
parameter. I have over a thousand funds, but it should only pull back
about 9 bassed upon that category.

Here is my working url:
http://www.uakron.edu/development2/funds/fund-detail_2.dot

Any help would be appreciated. I'm slamming into a wall.



[jQuery] Re: jquery.getJSON params not filtering

2009-05-14 Thread bradrice

OK, I changed it but it still returns everything. It isn't filtering.
Thanks for the suggestion.

On May 14, 12:54 pm, Josh Nathanson joshnathan...@gmail.com wrote:
 I think your params should look like this:

 { category:fundType }

 In your code, you are passing a string rather than a javascript object
 literal.

 -- Josh

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

 Behalf Of bradrice
 Sent: Thursday, May 14, 2009 9:38 AM
 To: jQuery (English)
 Subject: [jQuery] jquery.getJSON params not filtering

 I just can't seem to get getJSON to filter based upon the map I send
 in.

 Here is my code:

 $.getJSON('funds_static_json.dot',{category:fundType},function(json)
 {
                         dropdownSet.loadSelect(json);
                 }

 My post in firebug looks completely right:

 http://www.uakron.edu/development2/funds/funds_static_json.dot?catego...
 60

 The json is formatted properly and passes the lint test.

 However, I get the entire json back and not the filtered by my
 parameter. I have over a thousand funds, but it should only pull back
 about 9 bassed upon that category.

 Here is my working 
 url:http://www.uakron.edu/development2/funds/fund-detail_2.dot

 Any help would be appreciated. I'm slamming into a wall.


[jQuery] Re: jquery.getJSON params not filtering

2009-05-14 Thread Josh Nathanson

I would say then that it's probably your server code.  Maybe run some
debugging and make sure the parameters are coming in as you expect, and look
at the data server side before it goes back to the client.

-- JOsh



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of bradrice
Sent: Thursday, May 14, 2009 10:02 AM
To: jQuery (English)
Subject: [jQuery] Re: jquery.getJSON params not filtering


OK, I changed it but it still returns everything. It isn't filtering.
Thanks for the suggestion.

On May 14, 12:54 pm, Josh Nathanson joshnathan...@gmail.com wrote:
 I think your params should look like this:

 { category:fundType }

 In your code, you are passing a string rather than a javascript object
 literal.

 -- Josh

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

 Behalf Of bradrice
 Sent: Thursday, May 14, 2009 9:38 AM
 To: jQuery (English)
 Subject: [jQuery] jquery.getJSON params not filtering

 I just can't seem to get getJSON to filter based upon the map I send
 in.

 Here is my code:

 $.getJSON('funds_static_json.dot',{category:fundType},function(json)
 {
                         dropdownSet.loadSelect(json);
                 }

 My post in firebug looks completely right:

 http://www.uakron.edu/development2/funds/funds_static_json.dot?catego...
 60

 The json is formatted properly and passes the lint test.

 However, I get the entire json back and not the filtered by my
 parameter. I have over a thousand funds, but it should only pull back
 about 9 bassed upon that category.

 Here is my working
url:http://www.uakron.edu/development2/funds/fund-detail_2.dot

 Any help would be appreciated. I'm slamming into a wall.



[jQuery] Re: How to display additional text along with link

2009-05-14 Thread vmrao


Thanks. How about if I want to make it dynamic ? Say, I have several
links on the page with different extensions
(Ex: .doc, .docx, .ppt, .pptx, .pdf, .mpg). Can I accomplish the above
with one statement rather than hard coding what text to append for
each extension ?

On May 14, 12:23 pm, brian bally.z...@gmail.com wrote:
 $(a[href$='.pdf']).after(' (pdf)');



 On Thu, May 14, 2009 at 11:55 AM, vmrao maheshpav...@gmail.com wrote:

  I would like to display file extension along with the file links on a
  web page.

  For example, I would like to append (pdf) next to any pdf links.

  The following code works to some extent but not as I intended.
  $(a[href$='.pdf']).append( ( + 'pdf' + ) );

  If I use the above code, (pdf) is also underlined being part of the
  link. I want (pdf) next to the link and not as part of the link.- Hide 
  quoted text -

 - Show quoted text -


[jQuery] Re: declare variable

2009-05-14 Thread Richard D. Worth
Thanks for the correction Michael. Looks like I didn't look closely enough.
Sorry for the noise.

- Richard

On Thu, May 14, 2009 at 11:12 AM, Michael Geary m...@mg.to wrote:

  Nope.

 This:

   var $thisCell, $tgt = $(event.target);
 does not mean:

   var $thisCell = $(event.target);
   var $tgt = $(event.target);

 After all, there's only one jQuery object being created in the first
 example, and two distinct objects in the second.

 Nor does it set both variables to the same object, like this code:

   var $thisCell, $tgt;
   $thisCell = $tgt = $(event.target);
 What it really means is:

   var $thisCell;
   var $tgt = $(event.target);
 -Mike

  --
 *From:* Richard D. Worth
 Yup. See


 https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Statements/Var

 - Richard

 On Thu, May 14, 2009 at 2:12 AM, runrunforest craigco...@gmail.comwrote:


 Hi,

 I see this line in a plugin

 var $thisCell, $tgt = $(event.target);

 does that mean:

 var $thisCell = $(event.target);
 var $tgt = $(event.target);





[jQuery] Re: jquery.getJSON params not filtering

2009-05-14 Thread bradrice

I have this in there:

$.ajaxSetup({error:function(XMLHttpRequest,textStatus, errorThrown)
{
  alert(textStatus);
  alert(errorThrown);
  alert(XMLHttpRequest.responseText);
  }});

I've got it coming back right. I can see the json on the server and it
is serving correctly.

Like I said I am getting a proper response back and it is populating
the menu, just not filtering on the params I am telling it to filter
on.

On May 14, 1:08 pm, Josh Nathanson joshnathan...@gmail.com wrote:
 I would say then that it's probably your server code.  Maybe run some
 debugging and make sure the parameters are coming in as you expect, and look
 at the data server side before it goes back to the client.

 -- JOsh

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

 Behalf Of bradrice
 Sent: Thursday, May 14, 2009 10:02 AM
 To: jQuery (English)
 Subject: [jQuery] Re: jquery.getJSON params not filtering

 OK, I changed it but it still returns everything. It isn't filtering.
 Thanks for the suggestion.

 On May 14, 12:54 pm, Josh Nathanson joshnathan...@gmail.com wrote:
  I think your params should look like this:

  { category:fundType }

  In your code, you are passing a string rather than a javascript object
  literal.

  -- Josh

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

  Behalf Of bradrice
  Sent: Thursday, May 14, 2009 9:38 AM
  To: jQuery (English)
  Subject: [jQuery] jquery.getJSON params not filtering

  I just can't seem to get getJSON to filter based upon the map I send
  in.

  Here is my code:

  $.getJSON('funds_static_json.dot',{category:fundType},function(json)
  {
                          dropdownSet.loadSelect(json);
                  }

  My post in firebug looks completely right:

 http://www.uakron.edu/development2/funds/funds_static_json.dot?catego...
  60

  The json is formatted properly and passes the lint test.

  However, I get the entire json back and not the filtered by my
  parameter. I have over a thousand funds, but it should only pull back
  about 9 bassed upon that category.

  Here is my working
 url:http://www.uakron.edu/development2/funds/fund-detail_2.dot

  Any help would be appreciated. I'm slamming into a wall.


[jQuery] Re: How to display additional text along with link

2009-05-14 Thread vmrao


Also, I would like to apply a specific CSS style to the text being
added.

Here is my CSS.
.fileExtension {
padding-left:0pt;
font-family: Arial, Helvetica, sans-serif;
font-size: 7pt;
font-weight: normal;
color: #354963;
}

On May 14, 1:18 pm, vmrao maheshpav...@gmail.com wrote:
 Thanks. How about if I want to make it dynamic ? Say, I have several
 links on the page with different extensions
 (Ex: .doc, .docx, .ppt, .pptx, .pdf, .mpg). Can I accomplish the above
 with one statement rather than hard coding what text to append for
 each extension ?

 On May 14, 12:23 pm, brian bally.z...@gmail.com wrote:



  $(a[href$='.pdf']).after(' (pdf)');

  On Thu, May 14, 2009 at 11:55 AM, vmrao maheshpav...@gmail.com wrote:

   I would like to display file extension along with the file links on a
   web page.

   For example, I would like to append (pdf) next to any pdf links.

   The following code works to some extent but not as I intended.
   $(a[href$='.pdf']).append( ( + 'pdf' + ) );

   If I use the above code, (pdf) is also underlined being part of the
   link. I want (pdf) next to the link and not as part of the link.- Hide 
   quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: How to display additional text along with link

2009-05-14 Thread waseem sabjee
var obj = $(a);

for(var i = 0; i  obj.length; i++) {
obj.eq(i).wrap(span/span); // wrap the hyperlink in a span tag
obj.parent().eq(i).prepend(This is text before the hyperlink);
obj.parent().eq(i).append('This is text after the hyperlink');
}

use the above common method and you can furthur change this script to look
for hyperlinks with a specific class by saying :
var obj = $(a.myclass);
or
var obj = $(a#myid);
may be even
var obj = $(h2 a);

On Thu, May 14, 2009 at 7:46 PM, vmrao maheshpav...@gmail.com wrote:



 Also, I would like to apply a specific CSS style to the text being
 added.

 Here is my CSS.
 .fileExtension {
padding-left:0pt;
font-family: Arial, Helvetica, sans-serif;
font-size: 7pt;
font-weight: normal;
color: #354963;
 }

 On May 14, 1:18 pm, vmrao maheshpav...@gmail.com wrote:
  Thanks. How about if I want to make it dynamic ? Say, I have several
  links on the page with different extensions
  (Ex: .doc, .docx, .ppt, .pptx, .pdf, .mpg). Can I accomplish the above
  with one statement rather than hard coding what text to append for
  each extension ?
 
  On May 14, 12:23 pm, brian bally.z...@gmail.com wrote:
 
 
 
   $(a[href$='.pdf']).after(' (pdf)');
 
   On Thu, May 14, 2009 at 11:55 AM, vmrao maheshpav...@gmail.com
 wrote:
 
I would like to display file extension along with the file links on a
web page.
 
For example, I would like to append (pdf) next to any pdf links.
 
The following code works to some extent but not as I intended.
$(a[href$='.pdf']).append( ( + 'pdf' + ) );
 
If I use the above code, (pdf) is also underlined being part of the
link. I want (pdf) next to the link and not as part of the link.-
 Hide quoted text -
 
   - Show quoted text -- Hide quoted text -
 
  - Show quoted text -


[jQuery] Re: How to display additional text along with link

2009-05-14 Thread waseem sabjee
here i modified my code for class adding

var obj = $(a);

for(var i = 0; i  obj.length; i++) {
obj.eq(i).wrap(span/span

 ); // wrap the hyperlink in a span tag
 obj.parent().eq(i).prepend('span class=beforeThis is text before the
 hyperlink/span');
 obj.parent().eq(i).append('span class=afterThis is text after the
 hyperlink/span');
 }



On Thu, May 14, 2009 at 7:58 PM, waseem sabjee waseemsab...@gmail.comwrote:

 var obj = $(a);

 for(var i = 0; i  obj.length; i++) {
 obj.eq(i).wrap(span/span); // wrap the hyperlink in a span tag
 obj.parent().eq(i).prepend(This is text before the hyperlink);
 obj.parent().eq(i).append('This is text after the hyperlink');
 }

 use the above common method and you can furthur change this script to look
 for hyperlinks with a specific class by saying :
 var obj = $(a.myclass);
 or
 var obj = $(a#myid);
 may be even
 var obj = $(h2 a);


 On Thu, May 14, 2009 at 7:46 PM, vmrao maheshpav...@gmail.com wrote:



 Also, I would like to apply a specific CSS style to the text being
 added.

 Here is my CSS.
 .fileExtension {
padding-left:0pt;
font-family: Arial, Helvetica, sans-serif;
font-size: 7pt;
font-weight: normal;
color: #354963;
 }

 On May 14, 1:18 pm, vmrao maheshpav...@gmail.com wrote:
  Thanks. How about if I want to make it dynamic ? Say, I have several
  links on the page with different extensions
  (Ex: .doc, .docx, .ppt, .pptx, .pdf, .mpg). Can I accomplish the above
  with one statement rather than hard coding what text to append for
  each extension ?
 
  On May 14, 12:23 pm, brian bally.z...@gmail.com wrote:
 
 
 
   $(a[href$='.pdf']).after(' (pdf)');
 
   On Thu, May 14, 2009 at 11:55 AM, vmrao maheshpav...@gmail.com
 wrote:
 
I would like to display file extension along with the file links on
 a
web page.
 
For example, I would like to append (pdf) next to any pdf links.
 
The following code works to some extent but not as I intended.
$(a[href$='.pdf']).append( ( + 'pdf' + ) );
 
If I use the above code, (pdf) is also underlined being part of the
link. I want (pdf) next to the link and not as part of the link.-
 Hide quoted text -
 
   - Show quoted text -- Hide quoted text -
 
  - Show quoted text -





[jQuery] How to animate background images or background of div

2009-05-14 Thread g10tto

I'm putting together a portfolio site and I'd like to use high-res
images that take up most of the screen to show different works. There
would be a menu bar with links to each work, where a click on that
work's link would change the background by doing a standard dissolve
effect.

I have seen many different plugins for rotating images and changing
background colors at the click of a button. Is there a method
specifically for this purpose?

As an alternative to altering the background-image of the body itself,
I would be willing to use a properly sized div (or div's) to achieve
this effect.

Help appreciado! Thanks!


[jQuery] How to add different color when mouse over the link?

2009-05-14 Thread Akira

when I went to Brian homepage
http://cherne.net/brian/resources/jquery.hoverIntent.html

I found that he has different color on each menu link.

Thanks in advance.
Teera


[jQuery] javascript

2009-05-14 Thread www.yosaadi.co.cc

hi guys...i am newbie here..i just want to ask you..How to get
javascript tools and book...
because i want to know how to mak javascript alone for my blog

www.yosaadi.co.cc
http://yosaadi.blogspot.com
http://only-sharing.blogspot.com


tks for your information

regards
rangminang


[jQuery] Matching Columns with JQuery

2009-05-14 Thread mylessincl...@googlemail.com

Hello,

I came across JQuery when searching for a solution to get matching
column height with Divs.

I have downloaded JQuery which appears to be one file named
jquery-1.3.2.min I also have the following short script that I found,
which I believe goes in the head area of the page.  The script works
with jquery.

script language=javascript type=text/javascript src=../../js/
jquery/jquery.js/script
script
function equalHeight(group) {
tallest = 0;
group.each(function() {
thisHeight = $(this).height();
if(thisHeight  tallest) {
tallest = thisHeight;
}
});
group.height(tallest);
}
$(document).ready(function() {
equalHeight($(.column));
});
/script

I'm a complete novice at Javascript, but hopefully someone can advise
on the following questions.

1. I assume I need to rename my download file jquery-1.3.2.min to
jquery.js ?

2. Do I need to edit the jquery file somehow in order to get the above
script to work?

Hope someone can advise.

Many thanks

Myles


[jQuery] jQuery v1.3.2 error

2009-05-14 Thread Devision

Hello.

I recently updated my jQuery to 1.3.2 from 1.2.6 and now firebug shows
me error: tagName is undefined (jquery.js line 12)

Any ideas what might be the problem? All an all jQuery works just fine.


[jQuery] Re: jquery.getJSON params not filtering

2009-05-14 Thread Josh Nathanson

Well...I don't see anything in your code that would filter the JSON once it
comes back from the server.

You are just dumping the response into the select menu.  Once the params are
sent to the server, and the JSON is generated there, there is nothing else
that would happen to create further filtering.

The params in the getJSON function do not provide filtering for the returned
JSON, only keys/values to be passed to the server.

It seems like you might be better served doing the filtering on the server,
that way you do not have to pass back the entire list of funds, only the
ones in the category you send to the server.

-- Josh





-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of bradrice
Sent: Thursday, May 14, 2009 10:45 AM
To: jQuery (English)
Subject: [jQuery] Re: jquery.getJSON params not filtering


I have this in there:

$.ajaxSetup({error:function(XMLHttpRequest,textStatus, errorThrown)
{
  alert(textStatus);
  alert(errorThrown);
  alert(XMLHttpRequest.responseText);
  }});

I've got it coming back right. I can see the json on the server and it
is serving correctly.

Like I said I am getting a proper response back and it is populating
the menu, just not filtering on the params I am telling it to filter
on.

On May 14, 1:08 pm, Josh Nathanson joshnathan...@gmail.com wrote:
 I would say then that it's probably your server code.  Maybe run some
 debugging and make sure the parameters are coming in as you expect, and
look
 at the data server side before it goes back to the client.

 -- JOsh

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

 Behalf Of bradrice
 Sent: Thursday, May 14, 2009 10:02 AM
 To: jQuery (English)
 Subject: [jQuery] Re: jquery.getJSON params not filtering

 OK, I changed it but it still returns everything. It isn't filtering.
 Thanks for the suggestion.

 On May 14, 12:54 pm, Josh Nathanson joshnathan...@gmail.com wrote:
  I think your params should look like this:

  { category:fundType }

  In your code, you are passing a string rather than a javascript object
  literal.

  -- Josh

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

  Behalf Of bradrice
  Sent: Thursday, May 14, 2009 9:38 AM
  To: jQuery (English)
  Subject: [jQuery] jquery.getJSON params not filtering

  I just can't seem to get getJSON to filter based upon the map I send
  in.

  Here is my code:

  $.getJSON('funds_static_json.dot',{category:fundType},function(json)
  {
                          dropdownSet.loadSelect(json);
                  }

  My post in firebug looks completely right:

 http://www.uakron.edu/development2/funds/funds_static_json.dot?catego...
  60

  The json is formatted properly and passes the lint test.

  However, I get the entire json back and not the filtered by my
  parameter. I have over a thousand funds, but it should only pull back
  about 9 bassed upon that category.

  Here is my working
 url:http://www.uakron.edu/development2/funds/fund-detail_2.dot

  Any help would be appreciated. I'm slamming into a wall.



[jQuery] Re: jquery beginner question: defer $('x').text('change') until after $('x').animate()

2009-05-14 Thread Nikola

You're going to want to use callbacks...

$('#word1, #story').fadeOut('fast', function(){ $(#word 1).text
(lorem); $(#word).text(ipsum); $('#word1, #story').fadeIn
(slow)});

$('.frame3').click(function(){
 $('#story, #word1').fadeOut('fast', function(){ $('#story').text
(lorem); $('#word1').text(ipsum); $('#story, #word1').fadeIn
(slow)});
});



On May 14, 12:34 pm, illovich illov...@gmail.com wrote:
 I also tried

               $(function(){

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

                                      $('#story').animate({ opacity: 'hide'}, 
 'fast').css
 ('background-position' , '-0px -302px').animate({ opacity: 'show'},
 'fast');
                                          $('#word1').animate({ opacity: 
 'hide'}, 'fast').text(I loved
 you).animate({ opacity: 'show'}, 'fast');

                                  });
        })

 And that didn't work either - even though the .text method is after
 the .animate method, it still happens first.   Frustrating!


[jQuery] How to add a cookie to toggleclass

2009-05-14 Thread KD

Hi, I'm using Wordpress and each post will have a table.  I'm using
the following script to allow users to highlight a table cell when
they click on it.  It works with jQuery ui extension and the effects
core plugin:

jQuery(document).ready(function() {jQuery(td).click(function()
{ jQuery(this).toggleClass('highlight', 300);});});

I've been trying to incorporate the cookie plugin (by Klaus Hartl),
but have gotten no where.  I want users to be able to click on
different posts, but would like the highlighted table cells to remain
as they click to another post and then come back.  Hope that makes
sense!  Thanks all


[jQuery] Re: jquery beginner question: defer $('x').text('change') until after $('x').animate()

2009-05-14 Thread Nikola

Since you want to execute the text change and fadeIn after the
animation completes you need to use a callback...

$('.frame3').click(function(){
 $('#story, #word1').fadeOut('fast', function(){
  $('#story').text(lorem);
  $('#word1').text(ipsum);
  $('#story, #word1').fadeIn(slow)
 });
});

On May 14, 12:34 pm, illovich illov...@gmail.com wrote:
 I also tried

               $(function(){

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

                                      $('#story').animate({ opacity: 'hide'}, 
 'fast').css
 ('background-position' , '-0px -302px').animate({ opacity: 'show'},
 'fast');
                                          $('#word1').animate({ opacity: 
 'hide'}, 'fast').text(I loved
 you).animate({ opacity: 'show'}, 'fast');

                                  });
        })

 And that didn't work either - even though the .text method is after
 the .animate method, it still happens first.   Frustrating!


[jQuery] Re: jQuery v1.3.2 error

2009-05-14 Thread John Resig
Could you try it with an unminified version of jQuery? That might help a
little bit with debugging.

--John


On Thu, May 14, 2009 at 11:00 AM, Devision c...@e950.lv wrote:


 Hello.

 I recently updated my jQuery to 1.3.2 from 1.2.6 and now firebug shows
 me error: tagName is undefined (jquery.js line 12)

 Any ideas what might be the problem? All an all jQuery works just fine.



[jQuery] Re: How to display additional text along with link

2009-05-14 Thread vmrao

I think it is not clear. Here is my code.

$(a[href$='.doc']).after( ( + '.doc' + ) );
$(a[href$='.docx']).after( ( + '.docx' + ) );
$(a[href$='.xls']).after( ( + '.xls' + ) );
$(a[href$='.xlsx']).after( ( + '.xlsx' + ) );
$(a[href$='.ppt']).after( ( + '.ppt' + ) );
$(a[href$='.pptx']).after( ( + '.pptx' + ) );
$(a[href$='.pdf']).after( ( + '.pdf' + ) );
$(a[href$='.mpg']).after( ( + '.mpg' + ) );

I would like to know if it is possible to have a one-line code which
replaces all the above code. Also, for the extra text (ex: .doc) being
added, I need to add a special CSS style. I tried this and it does not
work.

$(a[href$='.doc']).after( ( + '.doc' + ) ).addClass
(fileExtension);


On May 14, 2:00 pm, waseem sabjee waseemsab...@gmail.com wrote:
 here i modified my code for class adding

 var obj = $(a);

 for(var i = 0; i  obj.length; i++) {
 obj.eq(i).wrap(span/span



  ); // wrap the hyperlink in a span tag
  obj.parent().eq(i).prepend('span class=beforeThis is text before the
  hyperlink/span');
  obj.parent().eq(i).append('span class=afterThis is text after the
  hyperlink/span');
  }

 On Thu, May 14, 2009 at 7:58 PM, waseem sabjee waseemsab...@gmail.comwrote:



  var obj = $(a);

  for(var i = 0; i  obj.length; i++) {
  obj.eq(i).wrap(span/span); // wrap the hyperlink in a span tag
  obj.parent().eq(i).prepend(This is text before the hyperlink);
  obj.parent().eq(i).append('This is text after the hyperlink');
  }

  use the above common method and you can furthur change this script to look
  for hyperlinks with a specific class by saying :
  var obj = $(a.myclass);
  or
  var obj = $(a#myid);
  may be even
  var obj = $(h2 a);

  On Thu, May 14, 2009 at 7:46 PM, vmrao maheshpav...@gmail.com wrote:

  Also, I would like to apply a specific CSS style to the text being
  added.

  Here is my CSS.
  .fileExtension {
         padding-left:0pt;
         font-family: Arial, Helvetica, sans-serif;
         font-size: 7pt;
         font-weight: normal;
         color: #354963;
  }

  On May 14, 1:18 pm, vmrao maheshpav...@gmail.com wrote:
   Thanks. How about if I want to make it dynamic ? Say, I have several
   links on the page with different extensions
   (Ex: .doc, .docx, .ppt, .pptx, .pdf, .mpg). Can I accomplish the above
   with one statement rather than hard coding what text to append for
   each extension ?

   On May 14, 12:23 pm, brian bally.z...@gmail.com wrote:

$(a[href$='.pdf']).after(' (pdf)');

On Thu, May 14, 2009 at 11:55 AM, vmrao maheshpav...@gmail.com
  wrote:

 I would like to display file extension along with the file links on
  a
 web page.

 For example, I would like to append (pdf) next to any pdf links.

 The following code works to some extent but not as I intended.
 $(a[href$='.pdf']).append( ( + 'pdf' + ) );

 If I use the above code, (pdf) is also underlined being part of the
 link. I want (pdf) next to the link and not as part of the link.-
  Hide quoted text -

- Show quoted text -- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: .ajax GET not working correctly at webhost

2009-05-14 Thread James

Have you tried using the Firebug add-on for Firefox to debug whether
the AJAX request was actually sent in the first place?
It's very helpful because it'll show you the exact URL that it
requests, the GET/POST data it sends, all HTTP data, and the response
you receive.

On May 13, 8:21 pm, Nahaz pierre.christoffer...@gmail.com wrote:
 Ah sorry about that.

 It doesn't cause an error, it looks like it sends data because ?
 nick=nick appears in your url but it does not get into the database
 somehow. If you call /data.php?nick=nick it will work, it's when it's
 called via $.ajax(); that the issue occurs. I havn't confirmed but it
 seems to occasionally work in IE7 but not FF or Chrome.

 I also tried to add cache: false and my own random generator to the
 url but it won't get posted to the url, only the ?nick=nick comes
 up.

 I will fix public access after work so you can see the problem in
 action.

 On May 13, 8:01 pm, James james.gp@gmail.com wrote:

  Define what not working correctly means.
  Does it cause an error? Does the request get sent but nothing happens?
  Does the request get sent without the GET data? ... etc.

  On May 12, 12:00 pm, Nahaz pierre.christoffer...@gmail.com wrote:

   I have this snippet:

   function ajaxAdd() {
           $('form').submit(function() {
                                      var nick = 
   document.register.nick.value;
                                      $(':submit', this).attr('value', 
   'Adding...');
                                      $(':submit', this).attr('disabled', 
   'disabled');
                                      $.ajax({
                                                     type: 'GET',
                                                     url: 'data.php',
                                                     data: 'nick=' + nick,
                                                     success: function() {
                                                             $(':submit', 
   this).removeAttr('disabled');
                                                             
   $('#status').load('output.php');
                                                             }
                                                     });
                                           });

   }

   that is sent when a very simple form (one value and button) is sent.
   The thing is, it works on my local webserver, but when I upload it to
   my webhost, it wont work. It works if add data.php?nick=Test, then the
   data will be added into my database but not when called from .ajax.- Hide 
   quoted text -

  - Show quoted text -


[jQuery] Re: .ajax GET not working correctly at webhost

2009-05-14 Thread James

Sorry, I mean all HTTP header data.

On May 14, 9:00 am, James james.gp@gmail.com wrote:
 Have you tried using the Firebug add-on for Firefox to debug whether
 the AJAX request was actually sent in the first place?
 It's very helpful because it'll show you the exact URL that it
 requests, the GET/POST data it sends, all HTTP data, and the response
 you receive.

 On May 13, 8:21 pm, Nahaz pierre.christoffer...@gmail.com wrote:

  Ah sorry about that.

  It doesn't cause an error, it looks like it sends data because ?
  nick=nick appears in your url but it does not get into the database
  somehow. If you call /data.php?nick=nick it will work, it's when it's
  called via $.ajax(); that the issue occurs. I havn't confirmed but it
  seems to occasionally work in IE7 but not FF or Chrome.

  I also tried to add cache: false and my own random generator to the
  url but it won't get posted to the url, only the ?nick=nick comes
  up.

  I will fix public access after work so you can see the problem in
  action.

  On May 13, 8:01 pm, James james.gp@gmail.com wrote:

   Define what not working correctly means.
   Does it cause an error? Does the request get sent but nothing happens?
   Does the request get sent without the GET data? ... etc.

   On May 12, 12:00 pm, Nahaz pierre.christoffer...@gmail.com wrote:

I have this snippet:

function ajaxAdd() {
        $('form').submit(function() {
                                   var nick = 
document.register.nick.value;
                                   $(':submit', this).attr('value', 
'Adding...');
                                   $(':submit', this).attr('disabled', 
'disabled');
                                   $.ajax({
                                                  type: 'GET',
                                                  url: 'data.php',
                                                  data: 'nick=' + nick,
                                                  success: function() {
                                                          $(':submit', 
this).removeAttr('disabled');
                                                          
$('#status').load('output.php');
                                                          }
                                                  });
                                        });

}

that is sent when a very simple form (one value and button) is sent.
The thing is, it works on my local webserver, but when I upload it to
my webhost, it wont work. It works if add data.php?nick=Test, then the
data will be added into my database but not when called from .ajax.- 
Hide quoted text -

   - Show quoted text -


[jQuery] Re: declare variable

2009-05-14 Thread Michael Geary

Actually, $thisCell is initialized with the *undefined* value, not the
*null* value.

var foo;  // undefined
var bar = null;  // null

alert( foo === bar );  // false
alert( foo == bar );  // true, but only because of type conversion

-Mike

 From: Peter Warnock
 
 No.  $thisCell is initialized with a null value in the current scope.
 
 - pw

 On May 13, 11:12 pm, runrunforest craigco...@gmail.com wrote:
  Hi,
 
  I see this line in a plugin
 
  var $thisCell, $tgt = $(event.target);
 
  does that mean:
 
  var $thisCell = $(event.target);
  var $tgt = $(event.target);



[jQuery] Re: How to display additional text along with link

2009-05-14 Thread vmrao

OK. I was able to add the text as well as apply special style to it
using the following code.

$(a[href$='.doc']:not(a[href^='http'])).after($('span/').attr
('class','fileExtension').html( ( + '.doc' + ) ));
$(a[href$='.docx']:not(a[href^='http'])).after($('span/').attr
('class','fileExtension').html( ( + '.docx' + ) ));
$(a[href$='.xls']:not(a[href^='http'])).after($('span/').attr
('class','fileExtension').html( ( + '.xls' + ) ));
$(a[href$='.xlsx']:not(a[href^='http'])).after($('span/').attr
('class','fileExtension').html( ( + '.xlsx' + ) ));
$(a[href$='.ppt']:not(a[href^='http'])).after($('span/').attr
('class','fileExtension').html( ( + '.ppt' + ) ));
$(a[href$='.pptx']:not(a[href^='http'])).after($('span/').attr
('class','fileExtension').html( ( + '.pptx' + ) ));
$(a[href$='.pdf']:not(a[href^='http'])).after($('span/').attr
('class','fileExtension').html( ( + '.pdf' + ) ));
$(a[href$='.mpg']:not(a[href^='http'])).after($('span/').attr
('class','fileExtension').html( ( + '.mpg' + ) ));

However, I am not sure if there is scope to minimize the above code
(as you see one line for every file extension).

On May 14, 2:42 pm, vmrao maheshpav...@gmail.com wrote:
 I think it is not clear. Here is my code.

 $(a[href$='.doc']).after( ( + '.doc' + ) );
 $(a[href$='.docx']).after( ( + '.docx' + ) );
 $(a[href$='.xls']).after( ( + '.xls' + ) );
 $(a[href$='.xlsx']).after( ( + '.xlsx' + ) );
 $(a[href$='.ppt']).after( ( + '.ppt' + ) );
 $(a[href$='.pptx']).after( ( + '.pptx' + ) );
 $(a[href$='.pdf']).after( ( + '.pdf' + ) );
 $(a[href$='.mpg']).after( ( + '.mpg' + ) );

 I would like to know if it is possible to have a one-line code which
 replaces all the above code. Also, for the extra text (ex: .doc) being
 added, I need to add a special CSS style. I tried this and it does not
 work.

 $(a[href$='.doc']).after( ( + '.doc' + ) ).addClass
 (fileExtension);

 On May 14, 2:00 pm, waseem sabjee waseemsab...@gmail.com wrote:



  here i modified my code for class adding

  var obj = $(a);

  for(var i = 0; i  obj.length; i++) {
  obj.eq(i).wrap(span/span

   ); // wrap the hyperlink in a span tag
   obj.parent().eq(i).prepend('span class=beforeThis is text before the
   hyperlink/span');
   obj.parent().eq(i).append('span class=afterThis is text after the
   hyperlink/span');
   }

  On Thu, May 14, 2009 at 7:58 PM, waseem sabjee 
  waseemsab...@gmail.comwrote:

   var obj = $(a);

   for(var i = 0; i  obj.length; i++) {
   obj.eq(i).wrap(span/span); // wrap the hyperlink in a span tag
   obj.parent().eq(i).prepend(This is text before the hyperlink);
   obj.parent().eq(i).append('This is text after the hyperlink');
   }

   use the above common method and you can furthur change this script to look
   for hyperlinks with a specific class by saying :
   var obj = $(a.myclass);
   or
   var obj = $(a#myid);
   may be even
   var obj = $(h2 a);

   On Thu, May 14, 2009 at 7:46 PM, vmrao maheshpav...@gmail.com wrote:

   Also, I would like to apply a specific CSS style to the text being
   added.

   Here is my CSS.
   .fileExtension {
          padding-left:0pt;
          font-family: Arial, Helvetica, sans-serif;
          font-size: 7pt;
          font-weight: normal;
          color: #354963;
   }

   On May 14, 1:18 pm, vmrao maheshpav...@gmail.com wrote:
Thanks. How about if I want to make it dynamic ? Say, I have several
links on the page with different extensions
(Ex: .doc, .docx, .ppt, .pptx, .pdf, .mpg). Can I accomplish the above
with one statement rather than hard coding what text to append for
each extension ?

On May 14, 12:23 pm, brian bally.z...@gmail.com wrote:

 $(a[href$='.pdf']).after(' (pdf)');

 On Thu, May 14, 2009 at 11:55 AM, vmrao maheshpav...@gmail.com
   wrote:

  I would like to display file extension along with the file links on
   a
  web page.

  For example, I would like to append (pdf) next to any pdf links.

  The following code works to some extent but not as I intended.
  $(a[href$='.pdf']).append( ( + 'pdf' + ) );

  If I use the above code, (pdf) is also underlined being part of the
  link. I want (pdf) next to the link and not as part of the link.-
   Hide quoted text -

 - Show quoted text -- Hide quoted text -

- Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: jquery.getJSON params not filtering

2009-05-14 Thread bradrice

That was an epiphany. Now I understand. I thought the map was a
filter. Thanks

On May 14, 2:05 pm, Josh Nathanson joshnathan...@gmail.com wrote:
 Well...I don't see anything in your code that would filter the JSON once it
 comes back from the server.

 You are just dumping the response into the select menu.  Once the params are
 sent to the server, and the JSON is generated there, there is nothing else
 that would happen to create further filtering.

 The params in the getJSON function do not provide filtering for the returned
 JSON, only keys/values to be passed to the server.

 It seems like you might be better served doing the filtering on the server,
 that way you do not have to pass back the entire list of funds, only the
 ones in the category you send to the server.

 -- Josh

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

 Behalf Of bradrice
 Sent: Thursday, May 14, 2009 10:45 AM
 To: jQuery (English)
 Subject: [jQuery] Re: jquery.getJSON params not filtering

 I have this in there:

 $.ajaxSetup({error:function(XMLHttpRequest,textStatus, errorThrown)
 {
               alert(textStatus);
               alert(errorThrown);
               alert(XMLHttpRequest.responseText);
           }});

 I've got it coming back right. I can see the json on the server and it
 is serving correctly.

 Like I said I am getting a proper response back and it is populating
 the menu, just not filtering on the params I am telling it to filter
 on.

 On May 14, 1:08 pm, Josh Nathanson joshnathan...@gmail.com wrote:
  I would say then that it's probably your server code.  Maybe run some
  debugging and make sure the parameters are coming in as you expect, and
 look
  at the data server side before it goes back to the client.

  -- JOsh

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

  Behalf Of bradrice
  Sent: Thursday, May 14, 2009 10:02 AM
  To: jQuery (English)
  Subject: [jQuery] Re: jquery.getJSON params not filtering

  OK, I changed it but it still returns everything. It isn't filtering.
  Thanks for the suggestion.

  On May 14, 12:54 pm, Josh Nathanson joshnathan...@gmail.com wrote:
   I think your params should look like this:

   { category:fundType }

   In your code, you are passing a string rather than a javascript object
   literal.

   -- Josh

   -Original Message-
   From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

   Behalf Of bradrice
   Sent: Thursday, May 14, 2009 9:38 AM
   To: jQuery (English)
   Subject: [jQuery] jquery.getJSON params not filtering

   I just can't seem to get getJSON to filter based upon the map I send
   in.

   Here is my code:

   $.getJSON('funds_static_json.dot',{category:fundType},function(json)
   {
                           dropdownSet.loadSelect(json);
                   }

   My post in firebug looks completely right:

  http://www.uakron.edu/development2/funds/funds_static_json.dot?catego...
   60

   The json is formatted properly and passes the lint test.

   However, I get the entire json back and not the filtered by my
   parameter. I have over a thousand funds, but it should only pull back
   about 9 bassed upon that category.

   Here is my working
  url:http://www.uakron.edu/development2/funds/fund-detail_2.dot

   Any help would be appreciated. I'm slamming into a wall.


[jQuery] Modify iframe with jquery

2009-05-14 Thread ripple

I have an iframe in a page that scrolls on initial load, but after
clicking a link and loading a different page I have to remove the
scroll(scrolling=no).

When the 2nd page loads I set the attr on the the iframe to
scrolling=no.

$('#iframe').attr('scrolling','no');

But, This does not seem to work. Does anyone know? Is the iframe more
of a static object after initial creation and load? Can it's parameters
(except for src) not be changed?

Thanks


[jQuery] Re: Modify iframe with jquery

2009-05-14 Thread waseem sabjee
$(#iframeid).contents.find(#elementid);
$(#iframeid).contents.find(#elementid).text();
$(#iframeid).contents.find(#elementid).html();

I used this earlier today with some php where a wysiwyg editor had its html
contents embedded in a Iframe and i hate to post the raw html to a database.
worked like a charm.

On Thu, May 14, 2009 at 10:43 PM, ripple ripple...@yahoo.com wrote:


 I have an iframe in a page that scrolls on initial load, but after
 clicking a link and loading a different page I have to remove the
 scroll(scrolling=no).

 When the 2nd page loads I set the attr on the the iframe to
 scrolling=no.

 $('#iframe').attr('scrolling','no');

 But, This does not seem to work. Does anyone know? Is the iframe more
 of a static object after initial creation and load? Can it's parameters
 (except for src) not be changed?

 Thanks


[jQuery] Re: Modify iframe with jquery

2009-05-14 Thread ripple
Thanks, but it's not the contents of the iframe that I'm looking for. It's 
altering the behavior(scrolling) of the iframe that i am trying to achieve.
 


--- On Thu, 5/14/09, waseem sabjee waseemsab...@gmail.com wrote:


From: waseem sabjee waseemsab...@gmail.com
Subject: [jQuery] Re: Modify iframe with jquery
To: jquery-en@googlegroups.com
Date: Thursday, May 14, 2009, 4:48 PM


$(#iframeid).contents.find(#elementid);
$(#iframeid).contents.find(#elementid).text();
$(#iframeid).contents.find(#elementid).html();

I used this earlier today with some php where a wysiwyg editor had its html 
contents embedded in a Iframe and i hate to post the raw html to a database. 
worked like a charm.


On Thu, May 14, 2009 at 10:43 PM, ripple ripple...@yahoo.com wrote:


I have an iframe in a page that scrolls on initial load, but after
clicking a link and loading a different page I have to remove the
scroll(scrolling=no).

When the 2nd page loads I set the attr on the the iframe to
scrolling=no.

$('#iframe').attr('scrolling','no');

But, This does not seem to work. Does anyone know? Is the iframe more
of a static object after initial creation and load? Can it's parameters
(except for src) not be changed?

Thanks



  

[jQuery] JQGrid...Delete Button?

2009-05-14 Thread Rick Dwyer


Hello List.

Playing around with jqgrid and the documentation describes the  
implementation of bSubmit and a bCancel button.


However, how do I display a Submit, Cancel and a Delete button in the  
same window?


So in the code below, I can change bSubmit to a value of Delete, but I  
lose my Submit value.  Adding an extra bSubmit:'Delete', does not  
work.


Is this possible?

Thanks,
--Rick


jQuery.jgrid.edit = { addCaption: Add Record,
editCaption: Edit Record,
bSubmit: Submit,
 bCancel: Cancel,
processData: Processing..., msg: {


[jQuery] Re: Matching Columns with JQuery

2009-05-14 Thread MorningZ

1. No... the file could be named foobar.js for all that matters

2.  It's hard to help get your script working without knowing what the
issue actually is...   doesn't work does not help someone help you


On May 14, 12:13 pm, mylessincl...@googlemail.com
mylessincl...@googlemail.com wrote:
 Hello,

 I came across JQuery when searching for a solution to get matching
 column height with Divs.

 I have downloaded JQuery which appears to be one file named
 jquery-1.3.2.min I also have the following short script that I found,
 which I believe goes in the head area of the page.  The script works
 with jquery.

 script language=javascript type=text/javascript src=../../js/
 jquery/jquery.js/script
 script
 function equalHeight(group) {
         tallest = 0;
         group.each(function() {
                 thisHeight = $(this).height();
                 if(thisHeight  tallest) {
                         tallest = thisHeight;
                 }
         });
         group.height(tallest);}

 $(document).ready(function() {
         equalHeight($(.column));});

 /script

 I'm a complete novice at Javascript, but hopefully someone can advise
 on the following questions.

 1. I assume I need to rename my download file jquery-1.3.2.min to
 jquery.js ?

 2. Do I need to edit the jquery file somehow in order to get the above
 script to work?

 Hope someone can advise.

 Many thanks

 Myles


[jQuery] Re: Modify iframe with jquery

2009-05-14 Thread waseem sabjee
$(#iframeid).contents.find(#elementid).append('div
id=newdiv\/div);

notice i use \/div instead of /div
this is due to the Why JavaScript Handles strings so \/ will actually give
you / sometimes you may need to use // instead

On Thu, May 14, 2009 at 10:56 PM, ripple ripple...@yahoo.com wrote:

 Thanks, but it's not the contents of the iframe that I'm looking for. It's
 altering the behavior(scrolling) of the iframe that i am trying to achieve.



 --- On *Thu, 5/14/09, waseem sabjee waseemsab...@gmail.com* wrote:


 From: waseem sabjee waseemsab...@gmail.com
 Subject: [jQuery] Re: Modify iframe with jquery
 To: jquery-en@googlegroups.com
 Date: Thursday, May 14, 2009, 4:48 PM


 $(#iframeid).contents.find(#elementid);
 $(#iframeid).contents.find(#elementid).text();
 $(#iframeid).contents.find(#elementid).html();

 I used this earlier today with some php where a wysiwyg editor had its html
 contents embedded in a Iframe and i hate to post the raw html to a database.
 worked like a charm.

 On Thu, May 14, 2009 at 10:43 PM, ripple 
 ripple...@yahoo.comhttp://us.mc344.mail.yahoo.com/mc/compose?to=ripple...@yahoo.com
  wrote:


 I have an iframe in a page that scrolls on initial load, but after
 clicking a link and loading a different page I have to remove the
 scroll(scrolling=no).

 When the 2nd page loads I set the attr on the the iframe to
 scrolling=no.

 $('#iframe').attr('scrolling','no');

 But, This does not seem to work. Does anyone know? Is the iframe more
 of a static object after initial creation and load? Can it's parameters
 (except for src) not be changed?

 Thanks






[jQuery] Get the Value of Custom Attribute from Parent

2009-05-14 Thread Matt M.

Hello,

I have been learning jQuery and have been loving it so far. But can't
figure out how to do the following...

1) Find the a inside a ul that has an active class.
2) Grab the value from the parent li and put it into a variable to
be used elsewhere.

Here is the example markup...

ul id=carousel
li class=carousel-item carouselindex=1
 a href=/someurlimg src=/someimg alt= //a
   /li
   li class=carousel-item carouselindex=2
 a class=active href=/someurlimg src=/someimg alt= //
a
   /li
/ul

So, in this example, I'd like to return a variable that = 2.

Any help is appreciated. Thanks!


[jQuery] If statement in form validation

2009-05-14 Thread choffman

Hi There,
I could use some help here.  I need to place a condition statement
(if) in this form validation script.  For some reason, I just can't
get it to work.  Basically, when a user un-checks a particular box
(billing_addr) additional form fields slide down, those fields need to
be validated.  If the box is checked the fields roll-up, become
disable and can be skipped.  What's the best way to accomplish this?

Thanks,
MD

$(document).ready(function() {
var billing_address = $(input[name='billing_addr']:!checked).val();
$.metadata.setType(validate);
$('#mysampleform').validate({
rules: {
first: required,
last: required,
address: required,
city: required,
state: required,
country: required,
zip: required,
membertype: required,
amount: required,
state: required,
mt: required,
email: true,

if (billing_address == 1) {
alert(billing_address);
billing_first: required,
billing_last: required,
billing_address: required,
billing_city: required,
billing_state: required,
billing_zip: required,
billing_email: true
}
},
messages: {
first: Please enter your first name,
}
});
});


[jQuery] Re: Get the Value of Custom Attribute from Parent

2009-05-14 Thread Bryan

Try this...

var answer = $(#carousel li a.active).parent().attr
(carouselindex);

Cheers,
Bryan

On May 14, 2:49 pm, Matt M. quink...@gmail.com wrote:
 Hello,

 I have been learning jQuery and have been loving it so far. But can't
 figure out how to do the following...

 1) Find the a inside a ul that has an active class.
 2) Grab the value from the parent li and put it into a variable to
 be used elsewhere.

 Here is the example markup...

 ul id=carousel
     li class=carousel-item carouselindex=1
      a href=/someurlimg src=/someimg alt= //a
    /li
    li class=carousel-item carouselindex=2
      a class=active href=/someurlimg src=/someimg alt= //
 a
    /li
 /ul

 So, in this example, I'd like to return a variable that = 2.

 Any help is appreciated. Thanks!


[jQuery] JQuery Treeview Expand selected node

2009-05-14 Thread BugBurger

I am using JQuery TreeView and have a question. my example tree look
like this

+Animals
+Birds
+Humans

I wats to expand a specific node. for example Birds. how do i do that ?


[jQuery] Re: Get the Value of Custom Attribute from Parent

2009-05-14 Thread Bryan

Try this

var ans = $(#carousel li a.active).parent().attr(carouselindex);

Cheers,
Bryan

On May 14, 2:49 pm, Matt M. quink...@gmail.com wrote:
 Hello,

 I have been learning jQuery and have been loving it so far. But can't
 figure out how to do the following...

 1) Find the a inside a ul that has an active class.
 2) Grab the value from the parent li and put it into a variable to
 be used elsewhere.

 Here is the example markup...

 ul id=carousel
     li class=carousel-item carouselindex=1
      a href=/someurlimg src=/someimg alt= //a
    /li
    li class=carousel-item carouselindex=2
      a class=active href=/someurlimg src=/someimg alt= //
 a
    /li
 /ul

 So, in this example, I'd like to return a variable that = 2.

 Any help is appreciated. Thanks!


[jQuery] Re: JQuery Treeview Expand selected node

2009-05-14 Thread PUTRA PRIMA
hmmh i have a good example from google ^__^
http://abeautifulsite.net/notebook/58

On Fri, May 15, 2009 at 3:23 AM, BugBurger soni.mau...@gmail.com wrote:


 I am using JQuery TreeView and have a question. my example tree look
 like this

 +Animals
 +Birds
 +Humans

 I wats to expand a specific node. for example Birds. how do i do that ?




-- 
Putra Prima A
0410630078 Teknik Elektro Brawijaya
3 ipa 2 smunsa 2004
http://siubie.zxq.net/wordpress/


[jQuery] Re: Fairly new to animation. Hold my hand please, hehe?

2009-05-14 Thread Ricardo

dude, you can't animate from inline to block. For any width/height
animation to work correctly the element needs display:block from the
start.

On May 14, 10:08 am, ldexterldesign m...@ldexterldesign.co.uk wrote:
 Hey guys,

 Got a little script I've written. Would like to animate the appearance
 of the #sidebar2 to it's new block element state if possible ($
 ('#sidebar2').css('display', 'block');).

         // 'get a quote!' button is clicked
         $('.contactQuote').click(function(){
                 $('#content').css('width', '33%');

               $('#sidebar2').css('display', 'block');

                 $('.wpcf7').css('border', '3px solid #6ABC00');
                 return false;
                 });
         $('.wpcf7 input').focus(function(){
                 $('.wpcf7').css('border', 'none');
                 });
         });

 What I've been experimenting with isn't working unfortunately :[

         // 'get a quote!' button is clicked
         $('.contactQuote').click(function(){
                 $('#content').css('width', '33%');

               $('#sidebar2').animate({display: block}, 1000);

                 $('.wpcf7').css('border', '3px solid #6ABC00');
                 return false;
                 });
         $('.wpcf7 input').focus(function(){
                 $('.wpcf7').css('border', 'none');
                 });
         });

 Any tips?

 Cheers dudes,
 L


[jQuery] Picking an element from a set

2009-05-14 Thread Buzzterrier

Sorry, I am sure this is a simple question but I cannot figure it
out.  I have :

div class=testfoo/div
div class=testbar/div
div class=testbaz/div
div class=testbif/div

I have a selector:
$(div.test)[2].fadeOut();

This gives a console error:
Error: $(div.test)[2].fadeOut is not a function


From Jquery in Action I thought the wrapped set was an array that I
could access.


[jQuery] jCarousel by Jan Sorgalla Options

2009-05-14 Thread tfat

Hi,

Hoping someone can assist:

1) I was wondering, is it's possible to use navigation buttons along
the top of the Carousel, with a short description, that will allow the
user to directly navigate to a panel within the carousel, using
jCarouosel?

Basically, if I want to do go directly to panel 5 instead of pressing
the right arrow 5 times, can this be done by pressing a navigation
button, along the top of the carousel?

If so, would really appreciate your help on what's involved?

2) With the jCarousel plug-in, can I programatically make the panel
change - if possible, would really appreciate an example?

3) Is it possible to programatically jump to a specified panel within
the carousel?


Thanks.
Tony.



[jQuery] Re: Get the Value of Custom Attribute from Parent

2009-05-14 Thread Matt M.

That works great. Thanks!

On May 14, 3:01 pm, Bryan stern@gmail.com wrote:
 Try this

 var ans = $(#carousel li a.active).parent().attr(carouselindex);

 Cheers,
 Bryan

 On May 14, 2:49 pm, Matt M. quink...@gmail.com wrote:

  Hello,

  I have been learning jQuery and have been loving it so far. But can't
  figure out how to do the following...

  1) Find the a inside a ul that has an active class.
  2) Grab the value from the parent li and put it into a variable to
  be used elsewhere.

  Here is the example markup...

  ul id=carousel
      li class=carousel-item carouselindex=1
       a href=/someurlimg src=/someimg alt= //a
     /li
     li class=carousel-item carouselindex=2
       a class=active href=/someurlimg src=/someimg alt= //
  a
     /li
  /ul

  So, in this example, I'd like to return a variable that = 2.

  Any help is appreciated. Thanks!


[jQuery] Re: Better way to trim whitespace from input?

2009-05-14 Thread infoaddicted

FYI: The discussion group software put a premature line break at the
end of line 4 of the code.

On May 14, 7:35 pm, infoaddicted jack.lapla...@gmail.com wrote:
 How about this?  It's only called when the user leaves the field.  The
 replace uses a regular expression, the part between the forward
 slashes.  The \s means space, the + means one or more of the
 preceding, and the $ means match only at the end of the string.

 $(document).ready(function(){
             $(#couponCode).blur(function (e){
                 $(#couponCode).val($(this).val().toUpperCase());
                 $(#couponCode).val($(this).val().replace(/\s+
 $/,''));
             });
         });


[jQuery] Re: If statement in form validation

2009-05-14 Thread James

Something like:

rules: {
 first: required,
 last: required,
 ..
 billing_first: {
  required: function() { return billing_address == 1; }
 },
 billing_last: {
  required: function() { return billing_address == 1; }
 },
 billing_first: {
  required: function() { return billing_address == 1; }
 },
 billing_address: {
  required: function() { return billing_address == 1; }
 },
 .
},

On May 14, 10:14 am, choffman mountain@gmail.com wrote:
 Hi There,
 I could use some help here.  I need to place a condition statement
 (if) in this form validation script.  For some reason, I just can't
 get it to work.  Basically, when a user un-checks a particular box
 (billing_addr) additional form fields slide down, those fields need to
 be validated.  If the box is checked the fields roll-up, become
 disable and can be skipped.  What's the best way to accomplish this?

 Thanks,
 MD

 $(document).ready(function() {
         var billing_address = $(input[name='billing_addr']:!checked).val();
         $.metadata.setType(validate);
         $('#mysampleform').validate({
                 rules: {
                         first: required,
                         last: required,
                         address: required,
                         city: required,
                         state: required,
                         country: required,
                         zip: required,
                         membertype: required,
                         amount: required,
                         state: required,
                         mt: required,
                         email: true,

                         if (billing_address == 1) {
                                 alert(billing_address);
                                 billing_first: required,
                                 billing_last: required,
                                 billing_address: required,
                                 billing_city: required,
                                 billing_state: required,
                                 billing_zip: required,
                                 billing_email: true
                         }
                 },
                 messages: {
                         first: Please enter your first name,
                 }
         });

 });


[jQuery] select category

2009-05-14 Thread Egipicio

hello someone know if you have any library or tutorial ...

create a menu on the ...

http://img4.imageshack.us/img4/1235/categoriak.jpg


[jQuery] Re: Browser differences in handling xml file structures?

2009-05-14 Thread Charlie





I'm using $ajax xml successfully for a google map project. The xml
being delivered seems to have unusual tag structure but $ajax still
parses it using following:

$.ajax({
 type: 'GET',
 url: 'somefile.xml',
 dataType: 'xml',
 error: function() {
  // do something
 },
 
 success: function(xml) {
  $(xml).find('record').each(function(){
   
   var id   = $(this).attr('id');   
   var street   = $(this).attr('street');  

   var city   = $(this).attr('city');
   var state   = $(this).attr('c');
   var latitude   = $(this).attr('lat');
   var longitude  = $(this).attr('long');
   ///do something
  })
 });  
});
  
XML structure:
  
  records 
   record
 id="1" 
 street="155 W 47th St"
 city="Chicago"
 state="IL" 
 latitude="41.3"
 long="-87.555111" 
/
  /records

Hope this helps


Ian Piper wrote:

  Hi all,

This is my first posting to this group, so I hope you will treat me  
gently.

I am having a problem with a script that I am writing and I believe it  
is centered within a piece of jQuery code. I have some code like this  
(simplified slightly):

	$.get('news/testfeed.xml', function(data) {
	$('record', data).each(function() {
 var $link = $('a/a')
   .attr('href', $('link', this).text())
   .text($('name', this).text());
 var $headline = $('h4/h4').append($link);


 var $summary = $('div/div')
   .addClass('summary')
   .html($('description', this).text());

 $('div/div')
   .addClass('headline')
   .append($headline)
   .append($summary)
   .appendTo($container);
   });

I am using this to read the title and description elements of an  
xml file which is the response from a RESTful request. I have put a  
simplified version of the xml file below (just one record, and removed  
the lom:classification stuff).

My problem, in a nutshell, is that the script works and displays data  
when I look at it in Safari or Firefox 2.0 (Mac). However, when I look  
at the same script running in Firefox 3 (Mac OS X or Windows) or IE7  
then nothing seems to be returned at all. I tried replacing the  
complex xml with a simple xml file like this:

 simple xml 
?xml version="1.0" encoding="UTF-8"?
records
 record
 title
 Title 1
 /title
 descriptionDescription 1/description
 teaserTeaser 1/teaser
 /record
/records
 simple xml 

and this displays fine in all browsers. So my question is, why do the  
browsers have different behaviour with respect to reading complex  
elements out of xml data, and how do I get the data I need out of the  
complex xml data reliably in other browsers?

Thanks for any advice you may be able to offer.


Ian.
--

 xml 
?xml version="1.0" encoding="UTF-8"?
zs:searchRetrieveResponse xmlns="http://www.mystuff.co.uk"
 xmlns:zs="http://www.loc.gov/zing/srw/" xmlns:diag="http://www.loc.gov/zing/srw/diagnostic/ 
"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.mystuff.co.uk schema/ 
content_node.xsd"
 xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/ 
"
 xmlns:lom="http://ltsc.ieee.org/xsd/LOM"
 zs:version1.1/zs:version
 zs:numberOfRecords2319/zs:numberOfRecords
 zs:records
 zs:record
 zs:recordSchemainfo:srw/schema/1/dc-v1.1/ 
zs:recordSchema
 zs:recordPackingxml/zs:recordPacking
 zs:recordData
 srw_dc:dc xmlns:srw_dc="info:srw/schema/1/dc-schema"
 lom:metaMetadata
 lom:identifier
 lom:catalogNS/lom:catalog
 lom:entry15296/lom:entry
 /lom:identifier
 /lom:metaMetadata
 teaserIntroduction to the secondary Frameworks  
section, including links to
 background on the Frameworks as well as to  
the English, mathematics, science
 and ICT sections. /teaser
 namexxx/name
 notesupdated/notes
 taggingConfidenceMedium/taggingConfidence
 dc:titleSecondary - Home Page/dc:title
 dc:descriptionIntroduction to the secondary  
Frameworks section, including
 links to background on the Frameworks as well  
as to the English,
 mathematics, science and ICT sections. / 
dc:description
 dc:identifiernsonline.org.uk~22760~15296/ 
dc:identifier
 /srw_dc:dc
 /zs:recordData
 zs:recordIdentifier15296/zs:recordIdentifier
 zs:recordPosition1/zs:recordPosition
 /zs:record
		/zs:records
/zs:searchRetrieveResponse

 xml 

  






[jQuery] A better way of writing this code?

2009-05-14 Thread Calvin


  Hi,

  I was able to get this script to work and was wondering if there was
a better/proper/more efficient way of writing it. Here is the script:


  $(document).ready(function() {
  $('li.a').hover(function() {
 $(this).addClass('move');
  });
$('li.a').mouseLeave(function() {
   $(this).removeClass('move');

  )};
)};

  Thanks for your time,

  Calvin Stephens


[jQuery] Sortable accordion-like widget

2009-05-14 Thread DanN

Got this coded, its an accordion like tool. It functions just how I
need it, except id love to make it sortable. Anyone help with the code
update?

jQuery :

$(function() {
$(#accordion1).addClass(ui-accordion ui-widget ui-helper-reset)
.find(h3)
.addClass(ui-accordion-header ui-helper-reset ui-state-default 
ui-
corner-top ui-corner-bottom)
.prepend('span class=ui-icon ui-icon-triangle-1-e/')
.hover(function() {
$(this).addClass(ui-state-hover);
},
function() {
$(this).removeClass(ui-state-hover);
})
.click(function() {

$(this).toggleClass(ui-accordion-header-active).toggleClass(ui-
state-active)

.toggleClass(ui-state-default).toggleClass(ui-corner-bottom)
.find( 
.ui-icon).toggleClass(ui-icon-triangle-1-e).toggleClass
(ui-icon-triangle-1-s)

.end().next().toggleClass(ui-accordion-content-active).toggle();
return false;
})
.next().addClass(ui-accordion-content ui-helper-reset 
ui-widget-
content ui-corner-bottom).hide();
})

HTML:

div id=accordion1

h3a href=#DRAW2/a/h3

div
CONTENT
/div

h3a href=#DRAW2/a/h3

div
CONTENT
/div

/div

Help appreciated in advance.


[jQuery] IE caching AJAX requests?

2009-05-14 Thread brian

It looks like IE is caching the response for some AJAX requests here.
The app I'm working on is a catalog of sorts. Clicking the link for a
category loads a set of items. Those, in turn, may be deleted from
the admin view. The delete works fine (I checked the DB) but, when
loading the same set of category items, I'm seeing the list unchanged.
That is, the thing that was deleted is still there.

Sorry for the crap explanation but I'm not really sure of a better way
of putting it. Bottom line is, has anyone seen this sort of behavior
with IE before? Can it cache the result of an AJAX request like that?
And, if so, how can I guard against that? Can I set cache-control
headers for an AJAX request?


  1   2   >