[jQuery] Re: selector, second to last row of table

2009-06-17 Thread ggerri

Hi

just want to share my piece of code for getting out values of rows/
cells.


$('#myTableID tr:gt(1)').each(function(){
 $(this).find('td').each(function(){
// get the cell text out with $.trim($(this).text());
 });
 });


hope that helps
Gerald


On Jun 17, 7:08 pm, theprodigy  wrote:
> I think I have it working now. It does what it's supposed to, but
> doesn't really seem to me that it would be all the effecient, should a
> table have lots of rows (unlikely, but may happen).
>
> Here is my code:
>
> $('a.moveup').click(function(event) {
>
>         //Send request to server
>         var href = $(this).attr('href');
>         $.get(href);
>
>         //Update table to show new layout
>         var $thisRow = $(this).parents('tr:first');
>         var $thisTable = $('#main_table');
>         var $rows = $('#main_table tr');
>
>         $thisRow.next().insertBefore($thisRow.prev().prev());
>         $thisRow.insertBefore( $thisRow.prev().prev().prev());
>
>         $rows.each(function(){
>                 $(this).find(".moveup").show();
>                 $(this).find(".movedown").show();
>         });
>
>         $thisTable.find("tr:nth-child(2)").find(".moveup").hide();
>         $thisTable.find("tr:last").prev().find(".movedown").hide();
>
>         return false;
>
> });
>
> Can anyone think of a more efficient way to do this?
>
> Thanks,
>
> Paul
>
> On Jun 16, 8:34 pm, RobG  wrote:
>
>
>
> > On Jun 17, 3:46 am, theprodigy  wrote:
>
> > > I've been trying for a while to alter the second to last row of a
> > > table. I've tried several ways. The number of rows is dynamic so I
> > > can't hard code a number into nth-child. I used $rowNeeded =
> > > $thisRow.parents('table:first').children().children().length - 1 to
> > > get the second to last row, but it doesn't seem like I can pass this
> > > variable into nth-child either.
>
> > > How can I select the second to last row of a table?
>
> > In browsers compliant with the W3C DOM 2 HTML specification, table
> > elements have a rows collection that contains all the rows in the
> > table.  That collection has a length attribute, so, where - table - is
> > a reference to a table element:
>
> >   var rows = table.rows;
> >   var secondLastRow = rows[rows.length - 2];
>
> > Since rows is a live collection, you can get a reference once and keep
> > it, it will dynamically updated regardless of how many rows are added
> > or removed from the table.  Note that the above will error if there
> > are less than two rows in the table, use with care.
>
> > --
> > Rob- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Add Class to all form elements

2009-06-17 Thread Loony2nz

The easiest implementation was Gustavo's.

however, how do i exlcude the submit button?

I guess i can go back and do a single call to remove the class after
the fact.

On Jun 17, 11:47 pm, Loony2nz  wrote:
> Hi all,
>
> Just for clarification, there is only one form on the page at any one
> time.
>
> Thank you all for you thoughts.  I'm going to try them tonite.
>
> On Jun 2, 9:40 am, mkmanning  wrote:
>
> > "if you have inputs that are not within forms"
> > That should never happen if you're using valid markup ;)
>
> > Although the OP gave no indication there'd be other forms on the page,
> > if you want to target a specific form just use the context:
>
> > $(':text,:checkbox,:radio',$('SPECIFIC_FORM')).addClass
> > ('YOUR_CLASSNAME');
>
> > Although it's not clear from the OP's text that he wants the classes
> > added for styling, that's a reasonable assumption. You're assigning a
> > class whose name is set using the value of "i" ("myflied_"+i), so
> > given that the OP said there could be "anywhere from 5 to 10 to 20 to
> > 50 fields", it would be extremely difficult to use those classes for
> > styling purposes.
>
> > Even if the class is to be used only for targeting the form elements
> > later with script, you'd have to use a ^= filter on the class name
> > since you could have classnames ranging from "myfield_0" to
> > "myfield_50". In short, there's not much to gain by adding the number
> > to the end of the class.
>
> > On Jun 2, 9:07 am, waseem sabjee  wrote:
>
> > > Yes but he only wants to add class to forms. myway is loop through all
> > > forms. or all forms with a specific class. then for each form loop through
> > > all inputs. this way is better only if you want certain forms not to have
> > > the class name or if you have inputs that are not within forms.
>
> > > On Tue, Jun 2, 2009 at 3:07 AM, mkmanning  wrote:
>
> > > > Or you could just do this:
>
> > > > $(':input,:checkbox,:radio').addClass('YOUR_CLASSNAME');
>
> > > > On Jun 1, 10:24 am, waseem sabjee  wrote:
> > > > > 
> > > > > $(function() {
>
> > > > > var myforms = $("form");
>
> > > > > myforms.each(function(i) {
>
> > > > > var myform = myforms.eq(i);
>
> > > > > var myfields = $("input", myform);
>
> > > > > myfields.each(function(i) {
>
> > > > > var myfield = myfields.eq(i);
>
> > > > > myfield.addClass("myflied_"+i);
>
> > > > > });
> > > > > });
> > > > > });
>
> > > > > 
>
> > > > > On Mon, Jun 1, 2009 at 7:19 PM, Loony2nz  wrote:
>
> > > > > > Hey everyone,
>
> > > > > > I need help with a jquery task.
>
> > > > > > I have a form that has it's HTML inserted into the database (yeah 
> > > > > > yeah
> > > > > > I know..not my idea..I'm new here and just finding this out).
>
> > > > > > Anyway, each form field has an embedded class in the HTML.
>
> > > > > > The form is dynamically generated.  Can be anywhere from 5 to 10 to 
> > > > > > 20
> > > > > > to 50 fields.
>
> > > > > > How can I loop over each form field and add a new class to the field
> > > > > > (either input or radio or checkbox)?
>
> > > > > > Thoughts?
>
> > > > > > Thanks!


[jQuery] Re: Add Class to all form elements

2009-06-17 Thread Loony2nz

Hi all,

Just for clarification, there is only one form on the page at any one
time.

Thank you all for you thoughts.  I'm going to try them tonite.



On Jun 2, 9:40 am, mkmanning  wrote:
> "if you have inputs that are not within forms"
> That should never happen if you're using valid markup ;)
>
> Although the OP gave no indication there'd be other forms on the page,
> if you want to target a specific form just use the context:
>
> $(':text,:checkbox,:radio',$('SPECIFIC_FORM')).addClass
> ('YOUR_CLASSNAME');
>
> Although it's not clear from the OP's text that he wants the classes
> added for styling, that's a reasonable assumption. You're assigning a
> class whose name is set using the value of "i" ("myflied_"+i), so
> given that the OP said there could be "anywhere from 5 to 10 to 20 to
> 50 fields", it would be extremely difficult to use those classes for
> styling purposes.
>
> Even if the class is to be used only for targeting the form elements
> later with script, you'd have to use a ^= filter on the class name
> since you could have classnames ranging from "myfield_0" to
> "myfield_50". In short, there's not much to gain by adding the number
> to the end of the class.
>
> On Jun 2, 9:07 am, waseem sabjee  wrote:
>
>
>
> > Yes but he only wants to add class to forms. myway is loop through all
> > forms. or all forms with a specific class. then for each form loop through
> > all inputs. this way is better only if you want certain forms not to have
> > the class name or if you have inputs that are not within forms.
>
> > On Tue, Jun 2, 2009 at 3:07 AM, mkmanning  wrote:
>
> > > Or you could just do this:
>
> > > $(':input,:checkbox,:radio').addClass('YOUR_CLASSNAME');
>
> > > On Jun 1, 10:24 am, waseem sabjee  wrote:
> > > > 
> > > > $(function() {
>
> > > > var myforms = $("form");
>
> > > > myforms.each(function(i) {
>
> > > > var myform = myforms.eq(i);
>
> > > > var myfields = $("input", myform);
>
> > > > myfields.each(function(i) {
>
> > > > var myfield = myfields.eq(i);
>
> > > > myfield.addClass("myflied_"+i);
>
> > > > });
> > > > });
> > > > });
>
> > > > 
>
> > > > On Mon, Jun 1, 2009 at 7:19 PM, Loony2nz  wrote:
>
> > > > > Hey everyone,
>
> > > > > I need help with a jquery task.
>
> > > > > I have a form that has it's HTML inserted into the database (yeah yeah
> > > > > I know..not my idea..I'm new here and just finding this out).
>
> > > > > Anyway, each form field has an embedded class in the HTML.
>
> > > > > The form is dynamically generated.  Can be anywhere from 5 to 10 to 20
> > > > > to 50 fields.
>
> > > > > How can I loop over each form field and add a new class to the field
> > > > > (either input or radio or checkbox)?
>
> > > > > Thoughts?
>
> > > > > Thanks!


[jQuery] Re: what is the correct way to test 'display' value in jQuery?

2009-06-17 Thread Jake Barnes

So can I do this?

if ($('#subnav-1').css('display') == "block") $('#subnav-1').css
('background-color', '#f00');

That is, if this element has display:block then turn the background
red?

Just a hypothetical example, of course.



On Jun 17, 10:55 pm, Ricardo  wrote:
> $('#subnav-1').toggle();
>
> http://docs.jquery.com/Effects/toggle
>
> You can also access the display property with $('#subnav-1').css
> ('display');
>
> On Jun 17, 10:02 pm, Jake Barnes  wrote:
>
>
>
> > This code works, but it seems inelegant:
>
> > if ($("#subnav-1")[0].style.display == "block") $("#subnav-1")
> > [0].style.display = "none";
>
> > This seems to violate The One True jQuery Way:
>
> > [0]
>
> > I assume I'm not suppose to do that.
>
> > The each() method is more elegant, but it is more verbose:
>
> > $("#subnav-1").each(function() {
> >     if (this.style.display == "block") this.style.display = "none";
>
> > }
>
> > Curious if there is another, shorter way to do this?


[jQuery] How can I improve the performance of this code?

2009-06-17 Thread WD.acgrs

the code:

var choiceShownArray = new Array();
var cache1 = $("span[class^='matrix_choice_']");
var cache2 = $("input[id^='showChoice']");
var cache3 = $(".has_outcome");
var cache4 = cache3.find("span[class^='matrix_choice_']
[cchar='']").next().andSelf();

function changeShowChoice() {
cache1.show();
var showingAll = true;

useNum = document.getElementById
("option_matrix_outcome_use_number").checked;
cchar = useNum ? (document.getElementById
("option_matrix_total_use_fraction").checked ? "cfrac" : "cint") :
"cchar";

for (var i = 1; i <= ; i++)
{
$(".matrix_choice_"+i).each( function () {
$(this).html( $(this).attr(cchar) );
});
}

choiceShownArray = choiceShownArray || [];
cache2.each( function(i) { choiceShownArray[i] = useNum ? true : $
(this).attr("checked"); $(this).attr("disabled", useNum); });

if( !useNum )
{
for(i = 0; i < choiceShownArray.length; ++i)
{
if( !choiceShownArray[i] )
{

$("span[class='matrix_choice_"+(i+1)+"']").next().andSelf().hide
();
showingAll = false;
}
}

cache4.hide();

cache3.find("span[class^='matrix_choice_']:visible:last").each
( function() {
if( $(this).hasClass("matrix_choice_seperator") )
$(this).hide();
});
}
--- end code ---

--- html ---
Ta, , Ka, 61, , 
--- end html ---

Is there any changes could be made to the above code to improve the
performance?
There are around 800 of this type of  in the table and about 70%
are of class "has_outcome" while the other is of class "no_outcome".

Thanks a lot.


[jQuery] Re: A bit of help with some jQuery effects

2009-06-17 Thread waseem sabjee
Try this.

put a hyperlink anywhere in the container

like this

test

use the following JQuery

$(".testlink").click(function(e) {
e.prevenntDefault();
});

if the page contianer slides in any direction a bit when you click this
there is probably a bug in the slider code on hyperlink click.

if the bug does not show after that try this


test

use the following JQuery

$(".testlink").click(function(e) {
e.prevenntDefault();
});

there is a possibility that it is reading anything with a hreff attribute
longer than 1 chaacter.


On Thu, Jun 18, 2009 at 1:57 AM, danomagazine wrote:

>
> On my site here (http://rightcross.net/coda/mosaic.html), I am using
> the coda slider effect I found here (http://jqueryfordesigners.com/
> coda-slider-effect/ ).
> And on the tab entitled "Home Groups", there is
> a link "Home Group 1", which links to a fancy zoom box that I got from
> here (http://orderedlist.com/demos/fancy-zoom-jquery/).
>
> But when I click on the fancy zoom text it scrolls the container a
> little to the right, and on some older browsers it returns to the
> original first container that loaded from the start.
>
> Any idea where the effects are conflicting? or what code I would have
> to amend to make it work more fluidly?
>
> Any help would be appreciated as I'm new to jQuery, and discovering
> how wonderful it is, but still don't quite grasp it all.
>


[jQuery] yii

2009-06-17 Thread ransacker

how to set selected option of an activeDropDownList into an
activeTextField


[jQuery] Re: How to dynamically size an ?

2009-06-17 Thread Charlie





if contents are text just use css, not likely a need for scripting this
li { float: left; width: 25%; text-align: center}
wrap contents in another tag if you want to visually separate borders,
backgrounds etc


Brian wrote:

  What I Have:
I have a bunch of inline blocks next to each other like such:

_[A]_[B]_[C] _[D]_


Key:
_ = margin
[letter] = box element,  in my case


Question:
How do I make it so that the margins on the left and right side of my
's determine the 's width? So, in other words, I am looking
for each box element to have a uniform width (so A, B, C, D will all
have the same width value), but I would like the margins to in fact
determine this value...? Basically, I suppose I am more or less
setting barricades outside of the box models (margins) and having the
padding fill-in the remaining amounts, equally for all 4 boxes...

In effect, I would like these 's to stretch the width of a larger
container (box), so that their width value is maximized, but
nonetheless conforms to the margins... Hope this makes sense.

I am new to jQuery, how would I go about coding this up?

  






[jQuery] parseerror on GET from window.location

2009-06-17 Thread jacktanner

I'm trying to do an AJAX GET.

var q_url = window.location.toString();
$.ajax({
type: 'GET',
url: q_url,
cache: false,
dataType: 'json',
success: function(response, textStatus) { ... },
error: function (xhr, textStatus, errorThrown) {
  alert(textStatus);
}
});

This triggers the error callback with textStatus == "parseerror". If I
hardcode q_url, everything works. Stepping through with Firebug shows
that q_url has the same value no matter if it's hardcoded or set via
window.location.toString() (or window.location.href or
window.location.pathname, which are all supposed to be strings
according to https://developer.mozilla.org/En/DOM/Window.location ).
The browser is Firefox 3.0.11. Any ideas?

A separate issue is that no matter whether the GET succeeds or fails,
instead of going to q_url, it goes to a url like q_url + '?
_=1245297612818'  (according to Firebug 1.3). What gives?


[jQuery] Re: How to test/filter for all divs being hidden ?

2009-06-17 Thread Charlie





One filter would be to check the length of div:visible, if zero no
div's visible

I think there is a lot easier way to accomplish your task without
having to splice for ID's, writing filter tests and without any if
statements at all by using classes for everything you are doing

By adding/removing classes you can create the filters  and by using the
index of button clicked , find corresponding info div to display . This
makes jquery so much easier to write , read , and troubleshoot  IMO

Take a look at this version of your script. The only markup difference
is to add class =" info" to all your #content div's. Looking at html in
Firebug is helpful for seeing the new classes  for better visual
understanding

        $(function(){
   $("#content div").addClass("info");// add this class so
don't have to splice to find ID, use index to locate instead
    $(".button").css({
    opacity: 0.3
    });
 
    $("#page-wrap div.button").click(function(){

   // add/remove info_active class to use as filter for 
visible content. Only the visible content will have this class
    $(".info_active").fadeOut().removeClass("info_active");
// info_active class added below when this div is made visible

    // much easier to index than splice to find ID's since
relationship is one to one
                var index= $(".button").index(this); 
    $(".info").eq(index).fadeIn().addClass("info_active"); 
                
                  use the active class to dim the previous button. 
Remove class on previous button has to happen before add to new or will
remove from button clicked
    $(".button_active").animate({
    opacity: 0.5,
    borderWidth: 1
    }, 600 ).removeClass("button_active");

                highlight css for newly clicked button
    $(this).animate({opacity: 1,borderWidth: 5    }, 600
).addClass("active");  div
   
    });        


        });



Suz T. wrote:

  
Thankyou for your response,  I'll try to clarify what I am trying to
doI am trying to have the content of a div on a page appear or
disappear based on a click of a link. However I want to start the page
with none of the content in divs being shown, thus I hid the #content
div's in the css.
  
  
What is happening now is first time I click on "xx-button" it then
fades in the corresponding "#content div.xx"  Then the next click of
say "x1-button" fades in #content div.x1" BUT it does not fade out the
previous "#content div.xx".  Same thing happens for the third
"x2-button", the "#content div.x2" is faded in but "#content div.x1"
and "#content div.xx" are still visible which is not what I want.
  
  
What I tried to do in the script is test if ALL the divs in "#content
div" are hidden.  if true then fade in the corresponding "#content
div.xx" to the clicked "xx-button". This is good and works for the
first condition of the page only.  At the next click to  "x1-button"
the if statement  "  appears to return true again.  As it appears that
"#content > div" is for any div in #content being hidden versus ALL.
So I am looking to understand how to write the filter/test to check if 
ALL the divs in #content being hidden
  
  
  
  
There may be simpler way to do this... this was the closest I came to
getting it almost where I wanted.
  
  
  
Thanks hope this clears it a bit & thanks in advance for the help.
  
  
  
Suz
  
  
  
  
  
Charlie wrote:
  
  this is 
confusing,  all the #content div's are already hidden by css (
display:none) and you say it's already working . Not very clear what
you are trying to accomplish


$("#content div").hide();  // this will hide every div within #content


using part of your click function below a "filter" like you are asking
about could be


$("#content div:visible").hide();


is that all you are trying to do is hide them?


Suz T. wrote:


Hello I am posting for the first time.. and am resending my message
because it didn't appear to post to the group.
  
As mentioned below, just starting out with jquery/_javascript_ and need
some help with the script below to have it start with none of the
#content div showing.
  
  
I expect this is pretty basic, so thanks in advance for any quick help
you can provide.
  
  
Thanks
  
Suz
  
  
SuzT wrote:
  
  Hello I am
a beginner to jquery/_javascript_ and I am trying to use a

script I saw online to replace the content of a div. However I would

like to have the script start with none of the target content showing.

So far it starts correctly however I am not sure how to test/filter

for ALL the divs in #content being hidden which would be the begging

state of the page.


Here is a link to what it is doing now.

http://now

[jQuery] json function how to pass more than 2 variables to php...HELP

2009-06-17 Thread jinnie

var sd=jQuery.noConflict();

   sd.getJSON("/include/employer/template/edit.php?action=t",
{plac:,gp:fpoint,job_id:}, function(json) {
// q.post("/include/employer/template/tryinp.php?geocode=finalpoint",
function(xml) {
//alert(xml);
var gphp=json.status;
alert(gphp);
},"json");

firebug error glasgow($finaladdress value) is not define


[jQuery] A bit of help with some jQuery effects

2009-06-17 Thread danomagazine

On my site here (http://rightcross.net/coda/mosaic.html), I am using
the coda slider effect I found here (http://jqueryfordesigners.com/
coda-slider-effect/). And on the tab entitled "Home Groups", there is
a link "Home Group 1", which links to a fancy zoom box that I got from
here (http://orderedlist.com/demos/fancy-zoom-jquery/).

But when I click on the fancy zoom text it scrolls the container a
little to the right, and on some older browsers it returns to the
original first container that loaded from the start.

Any idea where the effects are conflicting? or what code I would have
to amend to make it work more fluidly?

Any help would be appreciated as I'm new to jQuery, and discovering
how wonderful it is, but still don't quite grasp it all.


[jQuery] [validate] custom error label show and hide

2009-06-17 Thread Erwin Purnomo

Hi all...

I have created a form that consist of radio buttons group, and used
jQuery validate to check the input. But I came across this error label
that I want to modify the way it showed to the user

U must all know that jQuery validate plugin show the custom error
label by changing the css display:none to display:inline

But in my layout the display inline breaks the form, so I need the
display to be block or inline-block

Is there any way to also custom the way jQuery validate plugin shows
this custom error label?

Thank you


[jQuery] How to dynamically size an ?

2009-06-17 Thread Brian

What I Have:
I have a bunch of inline blocks next to each other like such:

_[A]_[B]_[C] _[D]_


Key:
_ = margin
[letter] = box element,  in my case


Question:
How do I make it so that the margins on the left and right side of my
's determine the 's width? So, in other words, I am looking
for each box element to have a uniform width (so A, B, C, D will all
have the same width value), but I would like the margins to in fact
determine this value...? Basically, I suppose I am more or less
setting barricades outside of the box models (margins) and having the
padding fill-in the remaining amounts, equally for all 4 boxes...

In effect, I would like these 's to stretch the width of a larger
container (box), so that their width value is maximized, but
nonetheless conforms to the margins... Hope this makes sense.

I am new to jQuery, how would I go about coding this up?


[jQuery] json function to parse value to php...HELP

2009-06-17 Thread jinnie

var sd=jQuery.noConflict();
   sd.getJSON("/include/employer/template/edit.php?action=t",
{finaladdress:,gp:fpoint,job_id:}, function(json) {
// q.post("/include/employer/template/tryinp.php?geocode=finalpoint",
function(xml) {
//alert(xml);
var gphp=json.status;
alert(gphp);
},"json");

is it correct??but firebug return error "glasgow(the $finaladdress
value) is not define)
T.T help


[jQuery] How to display submenu items in Superfish menu?

2009-06-17 Thread jstuardo

Hello...

this is a very basic question, but I don't know how to enter a Joomla
menu so that it has a hierarchy feasible to be shown using super fish
menu module.

Any help will be greatly appreciated,
Thanks

Jaime


[jQuery] Re: what is the correct way to test 'display' value in jQuery?

2009-06-17 Thread Ricardo

$('#subnav-1').toggle();

http://docs.jquery.com/Effects/toggle

You can also access the display property with $('#subnav-1').css
('display');

On Jun 17, 10:02 pm, Jake Barnes  wrote:
> This code works, but it seems inelegant:
>
> if ($("#subnav-1")[0].style.display == "block") $("#subnav-1")
> [0].style.display = "none";
>
> This seems to violate The One True jQuery Way:
>
> [0]
>
> I assume I'm not suppose to do that.
>
> The each() method is more elegant, but it is more verbose:
>
> $("#subnav-1").each(function() {
>     if (this.style.display == "block") this.style.display = "none";
>
> }
>
> Curious if there is another, shorter way to do this?


[jQuery] jQuery BlockUI Plugin

2009-06-17 Thread Dave Maharaj :: WidePixels.com
I am tryingto get this to work but no go.
 
I have  :
 
$('a[class^="edit_"]').click(function() { 
var url_id = $(this).attr('href');
  var e = $(this).attr('class');
  var x = $(this).attr('id').split('_');
  var y = x[0];
  var z = x[1];
  //alert(e);
  $('a[class^="edit_"]').block({ message: null }).fadeTo('slow' , 0.25 ,
function() {
   $('#resume_'+z).slideUp( 500 , function(){
$('#loading_'+z).show('fast', function() {
 $('#resume_'+z).load( url_id , function(){
  $('#loading_'+z).hide(function(){
   $('#resume_'+z).slideDown(500).fadeTo('fast', 1.0).fadeIn('slow');
   });
  });
 });
return false;
});
   });   
  });  
 
It appears to block but you can still click onthe link and it will load
another form. I have a page that has 5 edit buttons that load a form into a
divi do not want users to click more than1 at a time so i am blocking
the edit buttons once one is clicked. Submit the form or cancel releases the
block and that also removes its selfwhen the form is submitted
 
Where am i going wrong?
 
Dave 


[jQuery] Re: Cluetip - Fixed position using dimensions of parent element NOT calling element

2009-06-17 Thread PapaBear

Problem resolved.  Upon investigation the  tag seemed to have no
dimensions (using firebug to investigate) so tried moving the cluetip
to be triggered off the  tag instead.  Tooltips now positioning
correctly.

Cheers
James.


[jQuery] Re: what is the correct way to test 'display' value in jQuery?

2009-06-17 Thread Charlie Griefer
On Wed, Jun 17, 2009 at 6:02 PM, Jake Barnes wrote:

>
>
> This code works, but it seems inelegant:
>
> if ($("#subnav-1")[0].style.display == "block") $("#subnav-1")
> [0].style.display = "none";
>
> This seems to violate The One True jQuery Way:
>
> [0]
>
> I assume I'm not suppose to do that.
>
> The each() method is more elegant, but it is more verbose:
>
> $("#subnav-1").each(function() {
>if (this.style.display == "block") this.style.display = "none";
> }
>
> Curious if there is another, shorter way to do this?
>


$("#subnav-1").each(function() {
   this.toggle();
}

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


[jQuery] what is the correct way to test 'display' value in jQuery?

2009-06-17 Thread Jake Barnes


This code works, but it seems inelegant:

if ($("#subnav-1")[0].style.display == "block") $("#subnav-1")
[0].style.display = "none";

This seems to violate The One True jQuery Way:

[0]

I assume I'm not suppose to do that.

The each() method is more elegant, but it is more verbose:

$("#subnav-1").each(function() {
if (this.style.display == "block") this.style.display = "none";
}

Curious if there is another, shorter way to do this?







[jQuery] Newbie dumb question

2009-06-17 Thread Dave Maharaj :: WidePixels.com
Ok i am submitting a form with the jquery.formplugin by malsup
 
My dumb question is where do I put the script code? My Page loads -> click
edit i have a modal window open up and thats the form there in the modal
that iwant to submit ajax. Do i put my form script in the form page its self
or do I add it to the rest of my script snips I have for the rest of the
site?
 
$('#UpdateForm').bind('submit', function() {
   var numRand = Math.floor(Math.random()*10);
   var queryString = $('#UpdateForm').formSerialize();
   $(this).ajaxSubmit({
type:'post',
url:  '/update'/'+numRand ,
data: queryString,
target:   '#profile_location,

});
   
return false; // <-- important!
   
});
 
Dave


[jQuery] Error in IE - Error: 'url' is null or not an object

2009-06-17 Thread Heather

Site - http://www.scentsy.com/heather101
Location of js and css -
http://heather101.com/jcarousel/skins/tango/skin.css
http://heather101.com/jcarousel/scentsy/scentsy.js
http://heather101.com/jcarousel/skins/ie7/skin.css

The jCarousel works great in all other browsers, but in IE, when you
get to the end of the jCarousel it gives the "Error: 'url' is null or
not an object" pop up and it won't let me use the left arrow buttons
to go back.

Any help is much appreciated.


[jQuery] Re: Form plugin - success callback not executed ?

2009-06-17 Thread Mike Alsup

> I found out it's because I need an existing element for option "target".
> I didn't want any element to be updated by the result, that's why I put this
> #dummy pointing to nowhere.
> Well, I added an element display:none in my Html and point it to that one

Why use the target option if you don't want to target the response?


[jQuery] how don't make request after first request

2009-06-17 Thread Kirill

помогите please

how to set preferences autocompleter made no inquiry after the first,
which has already downloaded all the possible values?

какие указать настройки чтобы autocompleter не делал запрос после
первого, который уже загрузил все возможные варианты?

jQuery("#mobile").autocomplete(
"/autocomplete.php",{
minChars: 2,
matchContains: true,
extraParams:{c:'mobile'},
autoFill: false,
formatItem: function(row, i, max) {
return i + "/" + max + ": \"" + row.name + "\" [" + 
row.to + "]";
},
formatMatch: function(row, i, max) {
alert();
return row.name + " " + row.to;
},
formatResult: function(row) {
return row.to;
},
});


PS: sory my english((


[jQuery] jsonp - how don't make request after first request

2009-06-17 Thread Kirill

помогите please

how to set preferences autocompleter made no inquiry after the first,
which has already downloaded all the possible values?

какие указать настройки чтобы autocompleter не делал запрос после
первого, который уже загрузил все возможные варианты?

jQuery("#mobile").autocomplete(
"/autocomplete.php",{
minChars: 2,
matchContains: true,
extraParams:{c:'mobile'},
autoFill: false,
formatItem: function(row, i, max) {
return i + "/" + max + ": \"" + row.name + "\" [" + 
row.to + "]";
},
formatMatch: function(row, i, max) {
alert();
return row.name + " " + row.to;
},
formatResult: function(row) {
return row.to;
},
});


PS: sory my english((



[jQuery] Blocking for javascript include

2009-06-17 Thread Paul Tarjan

I'm writing a snippet of code to be put on any third party website and have
NO idea what environment it will be dropped into. My end goal is for the
badge to be

http://example.com/js/badge.js";>

I would like to use jQuery in my badge code to make my life easier, but I
don't want to require another include on the client side (getting anything
updated on the client is a pain).

This is the best I could come up with. I don't want anything before or after
my script to be affected with any leftover variables or weird collisions.

Does anyone see any issues? Any better solutions? The main one I see is the
time between the start of the anonymous function, and the end of checkLibs
is not going to block other scripts which might rely on window.jQuery being
available. Can you block other scripts in javascript?



// Namespace
if (typeof yourock == "undefined") yourock = {};

// Api function
yourock.popup = function(id) {
// Library isn't done loading
if (typeof(yourock.jQuery) == "undefined" || yourock.jQuery("*") ===
null) {
setTimeout(yourock.popup, 100);
return;
}
// Shorthand
var $ = yourock.jQuery;

// Do stuff
}

// Load libraries
(function() {
// If jQuery exists, save it and delete it to know when mine is loaded
var old_jQuery = null;
if (typeof(jQuery) != "undefined") {
if (typeof(jQuery.noConflict) == "function") {
old_jQuery = jQuery;
delete jQuery;
}
}

var addLibs = function() {
var head = document.getElementsByTagName("head");
if (head.length == 0) {
setTimeout(addLibs, 100);
return;
}

var node = document.createElement("script");
node.src = 
"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js";;
head[0].appendChild(node);
checkLibs();
}

var checkLibs = function() {
// Library isn't done loading
if (typeof(jQuery) == "undefined" || jQuery("*") === null) {
setTimeout(checkLibs, 100);
return;
}
yourock.jQuery = jQuery.noConflict(true);
jQuery = old_jQuery;
}

addLibs();
})();




[jQuery] using tabs in form fieldset

2009-06-17 Thread efet

Hi,
I was wondering if any of you would suggest me how to use the tabs in
the following page in a form:

http://refinethetaste.com/html/cp/?Section=orders&Process=AddOrder

I use jQuery.Tools tabs in all other pages but I never used it in a
form before.


// perform JavaScript after the document is scriptable.
$(function() {
$(".formtabs").tabs(".formpanes > div");

});




Customer Information


New Customer
Existing Customer
Anonymous Customer






Email Address



Password






Search
Customers

kcs...@hotmail.com






Email Address







[jQuery] Re: First Parent Siblings

2009-06-17 Thread Charlie





$(".classa").click(function () { 
             $(this).parent().next(".classdiv").toggle();
              
            });


FrenchiINLA wrote:

  Thank you for the reply. I would like to show hide the div located
right after the h3 when a.classa is clicked, and not all other
div.classdiv located on other lines. Thanks again

On Jun 17, 2:19 pm, waseem sabjee  wrote:
  
  
do you want to toggle the class on the div or toggle a transition  like
slideToggle or fadeToggle ?

On Wed, Jun 17, 2009 at 11:16 PM, FrenchiINLA wrote:





  I have several following html code:

  I tried $(this).parent('h3').siblings('div.classdiv').toggle();
but all div all toggled. Any help would be greatly appreciated
  

  
  
  






[jQuery] Re: Form plugin - success callback not executed ?

2009-06-17 Thread debussy007


I found out it's because I need an existing element for option "target".
I didn't want any element to be updated by the result, that's why I put this
#dummy pointing to nowhere.
Well, I added an element display:none in my Html and point it to that one
...



debussy007 wrote:
> 
> Hi,
> 
> it seems that my success callback is not getting executed, however, the
> Ajax post seems to be ok (200) with the correct text output ...
> The other params have effect, e.g. the ajax calls will be synchronous
> (option async to false)
> 
> $('td[id^=order]').each(function(i) {
>   var tdId = $(this).attr('id').substring(5, $(this).attr('id').length);
>   var options = { 
>   target:'#dummy',
>   beforeSubmit:  function(formData, jqForm, options) { return 
> true; },
>   success:   
>   function(responseText, statusText)  {
>   alert('test');  // not executed
>   },
>   type:  'post',
>   timeout: 3,
>   async: false,
>   error: function(xhr, status, ex) {}
>   };
>   $(this).find('form:first').ajaxSubmit(options);
> });
> 
> Anyone has an idea ?
> Thank you for any help !
> 

-- 
View this message in context: 
http://www.nabble.com/Form-plugin---success-callback-not-executed---tp24082230s27240p24082718.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: First Parent Siblings

2009-06-17 Thread Mauricio (Maujor) Samy Silva
Try:
$(this).parent().next().toggle();
Maurício

  -Mensagem Original- 
  De: FrenchiINLA 
  Para: jQuery (English) 
  Enviada em: quarta-feira, 17 de junho de 2009 18:16
  Assunto: [jQuery] First Parent Siblings



  I have several following html code:
  

[jQuery] Re: First Parent Siblings

2009-06-17 Thread FrenchiINLA

Thank you for the reply. I would like to show hide the div located
right after the h3 when a.classa is clicked, and not all other
div.classdiv located on other lines. Thanks again

On Jun 17, 2:19 pm, waseem sabjee  wrote:
> do you want to toggle the class on the div or toggle a transition  like
> slideToggle or fadeToggle ?
>
> On Wed, Jun 17, 2009 at 11:16 PM, FrenchiINLA wrote:
>
>
>
> > I have several following html code:
> > 

[jQuery] Re: First Parent Siblings

2009-06-17 Thread waseem sabjee
do you want to toggle the class on the div or toggle a transition  like
slideToggle or fadeToggle ?

On Wed, Jun 17, 2009 at 11:16 PM, FrenchiINLA wrote:

>
> I have several following html code:
> 

[jQuery] Re: jQuery in 3rd party environment

2009-06-17 Thread waseem sabjee
I really try my best to avoid running  JQuery of this link :
http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/ or any other external
source. wen i do i sometimes see my fade function dragging a bit. may be
include JQuery in your script ?

On Wed, Jun 17, 2009 at 11:12 PM, Paul Tarjan  wrote:

>
> I'm writing a snippet of code to be put on any third party website and
> have NO idea what environment it will be dropped into. My end goal is
> for the badge to be
>
> http://example.com/js/badge.js";>
>
> I would like to use jQuery in my badge code to make my life easier,
> but I don't want to require another include on the client side
> (getting anything updated on the client is a pain).
>
> This is the best I could come up with. I don't want anything before or
> after my script to be affected with any leftover variables or weird
> collisions.
>
> Does anyone see any issues? Any better solutions? The main one I see
> is the time between the start of the anonymous function, and the end
> of checkLibs is not going to block other scripts which might rely on
> window.jQuery being available. Can you block other scripts in
> javascript?
>
>
>
> // Namespace
> if (typeof yourock == "undefined") yourock = {};
>
> // Api function
> yourock.popup = function(id) {
>// Library isn't done loading
>if (typeof(yourock.jQuery) == "undefined" || yourock.jQuery("*")
> === null) {
>setTimeout(yourock.popup, 100);
>return;
>}
>// Shorthand
>var $ = yourock.jQuery;
>
>// Do stuff
> }
>
> // Load libraries
> (function() {
>// If jQuery exists, save it and delete it to know when mine is
> loaded
>var old_jQuery = null;
>if (typeof(jQuery) != "undefined") {
>if (typeof(jQuery.noConflict) == "function") {
>old_jQuery = jQuery;
>delete jQuery;
>}
>}
>
>var addLibs = function() {
>var head = document.getElementsByTagName("head");
>if (head.length == 0) {
>setTimeout(addLibs, 100);
>return;
>}
>
>var node = document.createElement("script");
>node.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/
> jquery.min.js";
>head[0].appendChild(node);
>checkLibs();
>}
>
>var checkLibs = function() {
>// Library isn't done loading
>if (typeof(jQuery) == "undefined" || jQuery("*") === null) {
>setTimeout(checkLibs, 100);
>return;
>}
>yourock.jQuery = jQuery.noConflict(true);
>jQuery = old_jQuery;
>}
>
>addLibs();
> })();


[jQuery] First Parent Siblings

2009-06-17 Thread FrenchiINLA

I have several following html code:

[jQuery] Re: IE6 Background Image Flicker

2009-06-17 Thread waseem sabjee
Opacity should work in IE6.
just beware of one think : In IE6 the last element also has the highest
priority.

I test all my sites on IE6,7,8, FF2,3 Chrome and safari. never had a problem
with opacity

On Wed, Jun 17, 2009 at 11:05 PM, Jeff  wrote:

>
> Since jQuery.browser and jQuery.browser.version are depreciated as of
> jQuery 1.3, what is the preferred way to check if the browser (in this
> case IE6) needs to have the "BackgroundImageCache" set?
>
> The closest match I see is jQuery.support.opacity, but I'm not sure if
> that is pertaining to how the browser interprets the alpha properties
> of images or if it's other elements as well?
>
> Ref: document.execCommand("BackgroundImageCache", false, true)
> Ref: http://docs.jquery.com/Utilities/jQuery.support
>


[jQuery] Form plugin - success callback not executed ?

2009-06-17 Thread debussy007


Hi,

it seems that my success callback is not getting executed, however, the Ajax
post seems to be ok (200) with the correct text output ...
The other params have effect, e.g. the ajax calls will be synchronous
(option async to false)

$('td[id^=order]').each(function(i) {
var tdId = $(this).attr('id').substring(5, $(this).attr('id').length);
var options = { 
target:'#dummy',
beforeSubmit:  function(formData, jqForm, options) { return 
true; },
success:   
function(responseText, statusText)  {
alert('test');  // not executed
},
type:  'post',
timeout: 3,
async: false,
error: function(xhr, status, ex) {}
};
$(this).find('form:first').ajaxSubmit(options);
});

Anyone has an idea ?
Thank you for any help !
-- 
View this message in context: 
http://www.nabble.com/Form-plugin---success-callback-not-executed---tp24082230s27240p24082230.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jQuery in 3rd party environment

2009-06-17 Thread Paul Tarjan

I'm writing a snippet of code to be put on any third party website and
have NO idea what environment it will be dropped into. My end goal is
for the badge to be

http://example.com/js/badge.js";>

I would like to use jQuery in my badge code to make my life easier,
but I don't want to require another include on the client side
(getting anything updated on the client is a pain).

This is the best I could come up with. I don't want anything before or
after my script to be affected with any leftover variables or weird
collisions.

Does anyone see any issues? Any better solutions? The main one I see
is the time between the start of the anonymous function, and the end
of checkLibs is not going to block other scripts which might rely on
window.jQuery being available. Can you block other scripts in
javascript?



// Namespace
if (typeof yourock == "undefined") yourock = {};

// Api function
yourock.popup = function(id) {
// Library isn't done loading
if (typeof(yourock.jQuery) == "undefined" || yourock.jQuery("*")
=== null) {
setTimeout(yourock.popup, 100);
return;
}
// Shorthand
var $ = yourock.jQuery;

// Do stuff
}

// Load libraries
(function() {
// If jQuery exists, save it and delete it to know when mine is
loaded
var old_jQuery = null;
if (typeof(jQuery) != "undefined") {
if (typeof(jQuery.noConflict) == "function") {
old_jQuery = jQuery;
delete jQuery;
}
}

var addLibs = function() {
var head = document.getElementsByTagName("head");
if (head.length == 0) {
setTimeout(addLibs, 100);
return;
}

var node = document.createElement("script");
node.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/
jquery.min.js";
head[0].appendChild(node);
checkLibs();
}

var checkLibs = function() {
// Library isn't done loading
if (typeof(jQuery) == "undefined" || jQuery("*") === null) {
setTimeout(checkLibs, 100);
return;
}
yourock.jQuery = jQuery.noConflict(true);
jQuery = old_jQuery;
}

addLibs();
})();


[jQuery] IE6 Background Image Flicker

2009-06-17 Thread Jeff

Since jQuery.browser and jQuery.browser.version are depreciated as of
jQuery 1.3, what is the preferred way to check if the browser (in this
case IE6) needs to have the "BackgroundImageCache" set?

The closest match I see is jQuery.support.opacity, but I'm not sure if
that is pertaining to how the browser interprets the alpha properties
of images or if it's other elements as well?

Ref: document.execCommand("BackgroundImageCache", false, true)
Ref: http://docs.jquery.com/Utilities/jQuery.support


[jQuery] jqModal - ajax response

2009-06-17 Thread prashant roy

Hi,

I am using jqModal to pop up the modal dialog box.
I want to check the content of loaded request in jqModal dialog box at
the time of  showing this jqModal dialog box.

its same thing like i want to have responseText of ajax call for this
JqModal dialog bo.

I know it has few methods for its callback like onShow/onHide,OnLoad
but how i can check returned content from ajax for this jQmodal.


-- 
Prashant Roy


[jQuery] Re: I am a new user and using jquery in lightbox and thikbox but i want more

2009-06-17 Thread waseem sabjee
This page has helped me through a lot when i started out.
http://docs.jquery.com/Events

On Wed, Jun 17, 2009 at 8:45 PM, SK Developers  wrote:

>
> Any body Know's where to find free ebook's for jQuery and Ajax let me
> know at www.mangomobi.com
>


[jQuery] Re: cloning ajax

2009-06-17 Thread James

It's possible that when you clone the form, you're also cloning all
the ID attributes that may be associated with the form or form fields.
Remember that a HTML document can only have unique IDs. Otherwise,
there will be conflicts, especially with Javascript coding.

On Jun 16, 8:24 pm, Peter Marino  wrote:
> Hi jQuery,
> when I clone a div that contains input fields with ajax then the cloned
> version will not
> do any ajaxing? is this normal?
>
> btw: I do use clone( true )
>
> regards,
> Peter
>
> --
> Power Tumbling -http://www.powertumbling.dk
> OSG-Help -http://osghelp.com


[jQuery] Re: jQuery Works fine with Firefox and Internet Explorer 8. Not with IE7?

2009-06-17 Thread amuhlou

in IE8 choose Tools > Compatibility View to trigger IE7 mode.

definitely check out that stray comma Nikola mentioned, as I've seen
IE choke on those lots of times before.

If you really want to uninstall IE8, you can probably do a system
restore back to a date before you installed IE8.

On Jun 17, 2:50 pm, Charlie  wrote:
> page breaks in IE 7
> w3 validator shows broken tags and  microsoft debug has error here :
> }).playlist(".entries");
> good practice to run validator (easy click from Firefox developer toolbar) , 
> can find  issues that may not be obvious, or when page not acting properly
>  http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.pangeaadvisors.org%2F
> another good resource is IE 
> Tester,http://www.my-debugbar.com/wiki/IETester/HomePage
> it mimics all versions of IE and can run script debugger
> efet wrote:I developed a website using jQuery plugins in part of it. Couple 
> of visitors visited the website with internet explorer complained that some 
> part of the website does not function at all. I have Internet Explorer 8 
> installed and I dont know how to downgrade it. Can someone test the website 
> and tell me the error please. Thank you in 
> advance!http://www.pangeaadvisors.org


[jQuery] I am a new user and using jquery in lightbox and thikbox but i want more

2009-06-17 Thread SK Developers

Any body Know's where to find free ebook's for jQuery and Ajax let me
know at www.mangomobi.com


[jQuery] Re: jQuery Works fine with Firefox and Internet Explorer 8. Not with IE7?

2009-06-17 Thread Charlie





page breaks in IE 7 

w3 validator shows broken tags and  microsoft debug has error here :
}).playlist(".entries");

good practice to run validator (easy click from Firefox developer
toolbar) , can find  issues that may not be obvious, or when page not
acting properly

 http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.pangeaadvisors.org%2F

another good resource is IE Tester,
http://www.my-debugbar.com/wiki/IETester/HomePage

it mimics all versions of IE and can run script debugger 

efet wrote:

  I developed a website using jQuery plugins in part of it. Couple of
visitors visited the website with internet explorer complained that
some part of the website does not function at all. I have Internet
Explorer 8 installed and I dont know how to downgrade it. Can someone
test the website and tell me the error please.

Thank you in advance!

http://www.pangeaadvisors.org


  






[jQuery] Re: trouble using $.get xml

2009-06-17 Thread James

If xml.drugstore.com is not the page that your Javascript is located
on, it's not going to work. You cannot use AJAX (XMLHTTPRequest) to
make cross-domain requests. If xml.drugstore.com is not your domain,
you're going to have to use another method. One recommended way is to
use a proxy script. For example, you have a PHP script on your server
that fetches the XML content form xml.drugstore.com and you call that
PHP script with $.get. Since the PHP script is on your server, you
should be able to call with without cross-domain issues.

On Jun 16, 1:34 pm, MattN  wrote:
> I'm having trouble using remote xml feeds. In this example, I'm trying
> to get product id's from drugstore.com's xml feed. Looking at my
> console log in Firebug... my get function isn't working.
>
> 
>
> $(function(){
>    $.get('http://xml.drugstore.com/xml.asp?
> c=10&b=&k=&SORT=&filter=&type=topsellers&trx=xml&trxp1=10&f=xml', {},
> function(xml) {
>       console.log('successfully got xml feed');
>       $('Details',xml).each(function(i){
>          productID = $(this).find('ProductID').text();
>          console.log(productID);
>       });
>    });
>
> });
>
> 


[jQuery] Re: jQuery Works fine with Firefox and Internet Explorer 8. Not with IE7?

2009-06-17 Thread Nikola

You know, you can view sites in IE7 mode with IE8  Just change the
Document Mode to IE7 standards.  Also, it's not a problem with jQuery
you have a trailing comma on line 65 of your inline script:

clip: {baseUrl: 'http://www.pangeaadvisors.org'}, // <-- This
comma is the problem

On Jun 17, 1:38 pm, efet  wrote:
> I developed a website using jQuery plugins in part of it. Couple of
> visitors visited the website with internet explorer complained that
> some part of the website does not function at all. I have Internet
> Explorer 8 installed and I dont know how to downgrade it. Can someone
> test the website and tell me the error please.
>
> Thank you in advance!
>
> http://www.pangeaadvisors.org


[jQuery] Re: Ajax firing at page load

2009-06-17 Thread James

The $.load is executed only when the getResults() function is called.
And you're calling it on document load.

The first line:
$('#PowerPipeConfigurations').change(function(){ getResults
(); }).change();

You're setting a callback onchange, and then you're calling: .change
();
This is executing the callback and thus, executes getResults().

I'm not sure why you're adding the .change(), .blue(), etc. at the
end.
You probably just want:
$('#PowerPipeConfigurations').change(function(){ getResults(); });

On Jun 17, 5:26 am, Greg F  wrote:
> Hi,
>
> This script (below) is firing at page load. Are there any ideas how
> not to get it to fire until and event happens. Thanks for the help.
>
> Greg
>
> $(document).ready(function () {
> if($('#DrainStackDiameter').val() != null){
> $('#PowerPipeConfigurations').change(function(){ getResults
> (); }).change();
> $('#TotalApartmentsServed').blur(function(){ getResults(); }).blur();
> $('#TotalWashroomsPerApartment').blur(function(){ getResults(); }).blur
> ();
> $('#TotalPowerPipeUnits').blur(function(){ getResults(); }).blur();
> $('#DrainStackLength').blur(function(){ getResults(); }).blur();
> $('#DrainStackDiameter').change(function(){     getResults(); }).change();}
>
> function getResults(){
>          var params = {
>        PowerPipeConfigurations: $('#PowerPipeConfigurations').val(),
>            TotalApartmentsServed: $('#TotalApartmentsServed').val(),
>            TotalWashroomsPerApartment:$('#TotalWashroomsPerApartment').val
> (),
>        TotalPowerPipeUnits: $('#TotalPowerPipeUnits').val(),
>        DrainStackLength: $('#DrainStackLength').val(),
>        DrainStackDiameter: $('#DrainStackDiameter').val()
>      };
>
>          $('#RecommendedPowerPipeModel').load('recommend.php',params);
>
> }


[jQuery] Re: Submit form with serialize() question

2009-06-17 Thread James

By 'images', if you mean uploading images, then no. You can't upload
files via AJAX (XMLHTTPRequest). There are a lot of workarounds by
using Flash or hidden iframes to make it like AJAX. Do a web search
and you'll find a lot of resources and plug-ins.

On Jun 17, 7:45 am, debussy007  wrote:
> Hello,
>
> I submit my form with the $.ajax method and passing it the serialized form.
> But what about the images inside the form ?
>
> Thank you for any help.
> --
> View this message in 
> context:http://www.nabble.com/Submit-form-with-serialize%28%29-question-tp240...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Problem in JQuery_intellisense at VS-08

2009-06-17 Thread Ricardo

AFAIK the vsdoc.js that ships with VS is only for it's autocomplete
feature. Use the latest release from here instead:
http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js

On Jun 17, 7:09 am, Ofer Hashimshony  wrote:
> Hey people I have a bug in Jquert intellisense
> When I add the reference to the intellisense file "(jquery-1.3.2-
> vsdoc.js)" It worked
> But everything when I add
> [code] [/
> code]
>
> To the page the Jquert intellisense Disappeared . What to do?
>
> [code]
>
> 
> 
>
> 
> 
> 
>
> 
> $(document).ready(function(){
> $("#btn1").toggle(function(){
> alert("Hay 1");},function(){
> alert("Hay 2");
> });
> });
>
> 
>
> [/code]
> I will be happy to receive help on this topic


[jQuery] Re: Delete image

2009-06-17 Thread brian

First of all, I'd put an ID on those img tags. If you've got these
recorded in a database, use the primary key (although keep in mind
that an HTML elemenet's ID cannot begin with a number, so you should
prepend some string, eg. 'img_543').

You could also just send the img path but, if you do that, make sure
that you have some way to ensure someone doesn't submit '/etc/passwd'
to your script.

So, let's say your img tags all have an ID of the form, "thumb_XX",
where "XX" is the primary key.

$('.thumbs img').click(function()
{
/* you can parse out the ID # here or in the PHP script
 */
var img_id = $(this).attr('id');

$.ajax(
{
type: 'POST',
url: '/PATH/TO/delete.php',
data: 'img='+img_id,
cache: false,
success:
function(text)
{
$('#'+img_id).parent('li').remove();
},
error: function(XMLHttpRequest, status, errorThrown)
{
// ...
}
});
});

I attached the click handler to the img tags, as the anchors are superfluous.

2009/6/17 Gmail :
>
> I've got thumbs list like this:
>
> http://pastebin.com/m23e40ca4
>
> I want to make a thumb disappear on click and send file name to php
> script (delete.php) which will delete image from server. How can I do
> this?
>


[jQuery] Re: Hide elements cleanly, not appear then disappear

2009-06-17 Thread Ricardo

If a page is small enough, I usually will hide them in javascript, on $
(document).ready():

myEl = $('#myEl').hide();
myEl.each(...);

A good alternative is to add a class to the body/html when javascript
is on, see here:
http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content

On Jun 17, 6:37 am, heldtogether  wrote:
> hey, i want to hide some elements on my site, but don't want to make
> these inaccessible for users without javascript enabled. Some users
> are complaining about being able to see that element for a split
> second before the page has finished loading and the element is hidden.
> Is there a way in which I can hide the elements right from the start,
> without using css to hide it completely?


[jQuery] Re: Horizontally scroll a table

2009-06-17 Thread michael

Hmm.  Forgot about trying that.  The Flexigrid plugin is working like
a champ though.  Also allows me to resize the table vertically.  (I'm
stuck developing for 1024x768 and it's rough trying to fit everything
on the screen...)

On Jun 17, 1:25 pm, liam  wrote:
> You could also add overflow to the container div's style.
>
> Seehttp://www.w3schools.com/Css/pr_pos_overflow.asp
>
> It might be easier than working with more js.
>
> On Jun 17, 9:03 am, michael  wrote:
>
>
>
> > Hello all,
>
> > Is there a plugin somewhere that will allow a table to horizontally
> > scroll within a set width?  I could swear I saw this once but can't
> > find it now.  Basically I'm looking for an Excel-like setup.  I have a
> > div that's 990px wide and need to constrain a table within that to
> > keep from going off and having the whole thing scroll horizontally.
> > Bonus points for freezing one or more columns on the left.  Has anyone
> > seen this or could anyone provide me with some pointers on getting it
> > done myself?- Hide quoted text -
>
> - Show quoted text -


[jQuery] Submit form with serialize() question

2009-06-17 Thread debussy007


Hello,

I submit my form with the $.ajax method and passing it the serialized form.
But what about the images inside the form ?

Thank you for any help.
-- 
View this message in context: 
http://www.nabble.com/Submit-form-with-serialize%28%29-question-tp24078650s27240p24078650.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jQuery Works fine with Firefox and Internet Explorer 8. Not with IE7?

2009-06-17 Thread efet

I developed a website using jQuery plugins in part of it. Couple of
visitors visited the website with internet explorer complained that
some part of the website does not function at all. I have Internet
Explorer 8 installed and I dont know how to downgrade it. Can someone
test the website and tell me the error please.

Thank you in advance!

http://www.pangeaadvisors.org



[jQuery] Re: cluetip + livequery (or other rebinding method)

2009-06-17 Thread Karl Swedberg

No problem.

You could do something like

// define the ct function
var ct = function {
  $('a.attr').cluetip({
cluetipClass: 'rounded',
dropShadow: false,
positionBy: 'mouse',
arrows: true
  });
};

// call the ct function
ct();

Then just pass a reference to ct in the callback. For example, if the  
callback is the only argument:


attributes_Table.fnReloadAjax(ct);

or:

attributes_Table.fnReloadAjax(function() {
  ct();
});

--Karl


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




On Jun 17, 2009, at 1:32 PM, Chris Hall wrote:



thanks, Karl.  You are the best.

It does have a callback, but I'm not sure what I would need to include
to have it rebind.

Do you have any suggestions?

On Jun 17, 1:28 pm, Karl Swedberg  wrote:

Hi Chris,

I went tohttp://www.sprymedia.co.uk/article/DataTablesbut I
coujldn't find the fnReloadAjax function in the documentation. Does  
it
have a callback argument? If so, you could rebind the cluetip in  
there.


--Karl


Karl Swedbergwww.englishrules.comwww.learningjquery.com

On Jun 17, 2009, at 11:10 AM, Chris Hall wrote:




Hello everyone.



I've searched and the posts about rebinding cluetip and thought
livequery would be a good option, but it just seems to work on the
first load?



Background:
I'm using the cluetip plugin along with the dataTable plugin.
DataTable is pulling its table info from ajax after the page loads
using this in the ready event:



   attributes_Table = $('#attributes').dataTable( {
   "bStateSave": true,
   "bProcessing": true,
   "bPaginate": false,
   "bLengthChange": false,
   "bFilter": false,
   "bSort": false,
   "bInfo": false,
   "aoColumns": [
   { "sClass": "attr", "sTitle":  
"Attribute" },
   { "sClass": "center", "sTitle":  
"Level"  }

   ],
   "sAjaxSource": '/ajax.php? 
action=get_attributes&id=122'

   } ) ;



cluetip is bound in the ready event using:



   $('a.attr').livequery(function(){
   $(this).cluetip({
   cluetipClass: 'rounded',
   dropShadow: false,
   positionBy: 'mouse',
   arrows: true
   })
   })


When the page loads, the table is populated correctly and the  
cluetips
inside the table work great.  But when an ajax call is made to  
refresh

the table using:



attributes_Table.fnReloadAjax();


cluetip no longer seems to work.  No errors are in the error  
console.


Is there a way to force livequery to rebind a.attr after I reload  
the

ajax?



Is there a better way to force the rebind after I reload the ajax?



Any help is greatly appreciated!




[jQuery] Re: cluetip + livequery (or other rebinding method)

2009-06-17 Thread Chris Hall

thanks, Karl.  You are the best.

It does have a callback, but I'm not sure what I would need to include
to have it rebind.

Do you have any suggestions?

On Jun 17, 1:28 pm, Karl Swedberg  wrote:
> Hi Chris,
>
> I went tohttp://www.sprymedia.co.uk/article/DataTablesbut I  
> coujldn't find the fnReloadAjax function in the documentation. Does it  
> have a callback argument? If so, you could rebind the cluetip in there.
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Jun 17, 2009, at 11:10 AM, Chris Hall wrote:
>
>
>
> > Hello everyone.
>
> > I've searched and the posts about rebinding cluetip and thought
> > livequery would be a good option, but it just seems to work on the
> > first load?
>
> > Background:
> > I'm using the cluetip plugin along with the dataTable plugin.
> > DataTable is pulling its table info from ajax after the page loads
> > using this in the ready event:
>
> >            attributes_Table = $('#attributes').dataTable( {
> >                            "bStateSave": true,
> >                            "bProcessing": true,
> >                            "bPaginate": false,
> >                            "bLengthChange": false,
> >                            "bFilter": false,
> >                            "bSort": false,
> >                            "bInfo": false,
> >                            "aoColumns": [
> >                                    { "sClass": "attr", "sTitle": 
> > "Attribute" },
> >                                { "sClass": "center", "sTitle": "Level"  }
> >                    ],
> >                            "sAjaxSource": 
> > '/ajax.php?action=get_attributes&id=122'
> >            } ) ;
>
> > cluetip is bound in the ready event using:
>
> >                    $('a.attr').livequery(function(){
> >                            $(this).cluetip({
> >                                    cluetipClass: 'rounded',
> >                                    dropShadow: false,
> >                                    positionBy: 'mouse',
> >                                    arrows: true
> >                            })
> >                    })
>
> > When the page loads, the table is populated correctly and the cluetips
> > inside the table work great.  But when an ajax call is made to refresh
> > the table using:
>
> > attributes_Table.fnReloadAjax();
>
> > cluetip no longer seems to work.  No errors are in the error console.
>
> > Is there a way to force livequery to rebind a.attr after I reload the
> > ajax?
>
> > Is there a better way to force the rebind after I reload the ajax?
>
> > Any help is greatly appreciated!


[jQuery] Re: Cluetip with Image Maps

2009-06-17 Thread Karl Swedberg
I think I fixed a couple bugs with this sort of thing in the Github  
version. Can you try that one and let me know if it works?


http://github.com/kswedberg/jquery-cluetip/tree/master

thanks,

--Karl


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




On Jun 17, 2009, at 8:09 AM, Robert wrote:



Hi,

I have a small problem with image maps and clueTip.

Client requires 4 map areas on an image (plus the image itself) to
trigger cluetip.

The image itself triggers a sticky clueTip with now Title
2 Map Areas trigger a standard clueTip with custom width with No Title
2 Map Areas trigger the same sticky clueTip as the image with No Title

I almost have this working, the Image itseld triggers properly as to
the first 2 Image Maps as normal clueTips.

But unfortunately the Title is appearing on the 2 Map areas that are
triggering the sticky, even though I have these set to showTitle:
false in both my Javascript in the header as well as the
jquery.clueTip.js

The image itself does not display a title, but this is due to no ALT/
TITLE values being set. Unfortunately the 2 image maps do require ALT/
TITLE values in the HTML, I just don't want them to show up in the
sticky clueTip.

This is my Javascript in the header of the page.
$('area.ref').cluetip({width: '350px', showTitle: false, leftOffset:
-300});

// #sticky is for the whole image when not clicking on the image map
areas
$('#sticky').cluetip({showTitle: false, sticky: true, closePosition:
'top', arrows: false, width: '500px', activation: 'click', topOffset:
100});

// the following is for both image map areas.
$('area.map').cluetip({splitTitle: ' ', showTitle: false, sticky:
true, closePosition: 'top', arrows: false, width: '500px', activation:
'click', topOffset: -250, leftOffset: -500});

And here is my HTML Code for the image and Image Map.


		
ref-14.html" rel="ref/mod3/ref-14.html" />
		
ref-21.html" rel="ref/mod3/ref-21.html" />

coords="277,201,200,155,199,83,353,84,354,155,276,200" href="/ref/ 
mod3/

chart-1.html" rel="/ref/mod3/chart-1.html" alt="Image Map 2 Sticky"
title="Image Map 2 Sticky" />


Any ideas on how I can turn off the Title in the 2 Image Maps that are
triggering the Sticky clueTip?

I've tried everything from hacking the CSS to stripTitle with a " ".

Thanks in advance.

Robert





[jQuery] Re: cluetip + livequery (or other rebinding method)

2009-06-17 Thread Karl Swedberg

Hi Chris,

I went to http://www.sprymedia.co.uk/article/DataTables but I  
coujldn't find the fnReloadAjax function in the documentation. Does it  
have a callback argument? If so, you could rebind the cluetip in there.


--Karl


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




On Jun 17, 2009, at 11:10 AM, Chris Hall wrote:



Hello everyone.

I've searched and the posts about rebinding cluetip and thought
livequery would be a good option, but it just seems to work on the
first load?

Background:
I'm using the cluetip plugin along with the dataTable plugin.
DataTable is pulling its table info from ajax after the page loads
using this in the ready event:

attributes_Table = $('#attributes').dataTable( {
"bStateSave": true,
"bProcessing": true,
"bPaginate": false,
"bLengthChange": false,
"bFilter": false,
"bSort": false,
"bInfo": false,
"aoColumns": [
{ "sClass": "attr", "sTitle": 
"Attribute" },
{ "sClass": "center", "sTitle": "Level"  }
],
"sAjaxSource": 
'/ajax.php?action=get_attributes&id=122'
} ) ;

cluetip is bound in the ready event using:

$('a.attr').livequery(function(){
$(this).cluetip({
cluetipClass: 'rounded',
dropShadow: false,
positionBy: 'mouse',
arrows: true
})
})


When the page loads, the table is populated correctly and the cluetips
inside the table work great.  But when an ajax call is made to refresh
the table using:

attributes_Table.fnReloadAjax();

cluetip no longer seems to work.  No errors are in the error console.

Is there a way to force livequery to rebind a.attr after I reload the
ajax?

Is there a better way to force the rebind after I reload the ajax?

Any help is greatly appreciated!




[jQuery] Re: Horizontally scroll a table

2009-06-17 Thread liam

You could also add overflow to the container div's style.

See http://www.w3schools.com/Css/pr_pos_overflow.asp

It might be easier than working with more js.

On Jun 17, 9:03 am, michael  wrote:
> Hello all,
>
> Is there a plugin somewhere that will allow a table to horizontally
> scroll within a set width?  I could swear I saw this once but can't
> find it now.  Basically I'm looking for an Excel-like setup.  I have a
> div that's 990px wide and need to constrain a table within that to
> keep from going off and having the whole thing scroll horizontally.
> Bonus points for freezing one or more columns on the left.  Has anyone
> seen this or could anyone provide me with some pointers on getting it
> done myself?


[jQuery] Re: jQuery Conference for 2009?

2009-06-17 Thread Karl Swedberg
There will be a jQuery conference in Boston this year, unless  
something goes horribly wrong. We don't have any information to  
provide at this time, but will do so when it becomes available. Sorry,  
I don't mean to leave anyone in the dark. It's just that specific  
dates, times, number of days, and location haven't been determined yet.


--Karl


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




On Jun 16, 2009, at 11:09 AM, MorningZ wrote:



There wasn't much chatter on the jQuery day here on the group last
year either (yet it was packed!)

So i wouldn't gauge interest in it by this mailing list  :-)


On Jun 16, 10:41 am, ak732  wrote:

So... is there no interest in a jQuery conference up in Boston this
year?

Incidentally, this entire post doesn't show up when searching through
the group posts.  I searched on "conference", on "Boston" and on
"Guinness" without pulling up this topic.  Weird.




[jQuery] Re: Horizontally scroll a table

2009-06-17 Thread michael

I found one.  Flexigrid will scroll horizontally.


On Jun 17, 9:03 am, michael  wrote:
> Hello all,
>
> Is there a plugin somewhere that will allow a table to horizontally
> scroll within a set width?  I could swear I saw this once but can't
> find it now.  Basically I'm looking for an Excel-like setup.  I have a
> div that's 990px wide and need to constrain a table within that to
> keep from going off and having the whole thing scroll horizontally.
> Bonus points for freezing one or more columns on the left.  Has anyone
> seen this or could anyone provide me with some pointers on getting it
> done myself?


[jQuery] (validate) clearing error state / bug with check function

2009-06-17 Thread Iristyle

I have a feature request / and/or bugfix depending on how you'd like
to look at the problem.

I have a section of a form that is toggled to/from a disabled state
based on another control.  For the sake of the example, if the
'authentication' checkbox is checked, then a 'username' and 'password'
text boxes become enabled, and are required fields.  These fields also
have additional validation rules.

This works totally fine w/ the validation rules as expected when
clicking on a submit button.

However, in an effort to make the form a little more interactive, I
need to clear any previous errors in the UI when the checkbox is
unchecked (which disables username and password).  Those text boxes no
longer need of validation as they will not be submitted.  Of course,
they also need to be reshown when the text boxes enter an enabled
state again if the checkbox is set.

In my "change" binding, I can do a validator.element(el) on each text
box to cause validation and theoretically clear the 'highlight'
state.  Unfortunately though, the check function does not monitor the
disabled state of the element.

At line 476 of version 1.5.5, add this line of code to the check
function -
if (element.disabled) return true;

Yes, this is redundant based from the perspective of validating the
whole form as disabled controls aren't included in the jQuery
selector... however, I think this check should be performed since any
element could theoretically passed to this public facing method.

I haven't done a ton of testing yet, but in my experience, this
effectively clears the error state on the dynamically disabled control
properly.



Additionally, it would be useful to have a method on the validator
that can be called on a jQuery collection that will clear the
'highlight' error state -- but that's not totally necessary with the
above fix.



Thanks


[jQuery] Re: get email and send email?

2009-06-17 Thread chris thatcher
just to make things terribly confusing ;)

javascript is actually ecmascript, which can be used anywhere an
implementation of the scripting engine is available.  On the server you can
use spidermonkey (a c++ implementation from mozilla), rhino(a java
implementation also from mozilla), etc.  On the client, all browsers support
javascript, but the client-side javascript is 'enhanced' with additional
apis to manipulate the DOM, use AJAX, etc.

also all browsers (IE6/7 *cough*) make it extra difficult by deviating from
the w3c standard for the enhanced client-side api. libraries like jquery
hide these differences as well as provide elegant patterns that reduce your
general effort to write useful code.

im only saying this because if you are new to web development you may decide
to lower your barrier of entry by learning a single language, javascript,
and using it on both the client and the server.

sorry for the fog, hope the muddy water settles for you soon

thatcher

On Wed, Jun 17, 2009 at 12:49 PM, waseem sabjee wrote:

> JQuery is a JavaScript Library.
> JavaScript is a form of client side scripting.
>
> PHP is a form of server side scripting.
>
> they are not the same.
>
> JQuery is not a library for PHP, however you can use JQuery and PHP in
> combination.
>
> for example.
>  // this is a php block of code
> $y = 5;
> $x = 2 * y; // note this is a php variable x
> // we know have to export this to the JavaScript
> ?>
> 
> // this is a JavaScript block of code
> $(function() { // note the dollar sign here is not from PHP
>
> /*
>  we declare a variable in JavaScript
>  the value we are assigning to this variable is from a pre-declared php
> variable
>  then we just alert it to the user
> we are importing the php variable
> */
> var myAnswer = ;
> alert(myAnswer);
>
> });
> 
>
>
> On Wed, Jun 17, 2009 at 6:40 PM, inkexit  wrote:
>
>>
>> Thanks for all your help guys.  A recomendation is import because I'm
>> a complete noob when it comes to web programming.  FWIW, I do have a
>> lot of experince with C++ though.
>>
>> One question.  I thought jQuery was a php library?  One poster here
>> said that jQuery will only run in the client's browser, but another
>> poster said I could use php on the server side to read email.
>> Confused...
>
>
>


-- 
Christopher Thatcher


[jQuery] Re: selector, second to last row of table

2009-06-17 Thread theprodigy

I think I have it working now. It does what it's supposed to, but
doesn't really seem to me that it would be all the effecient, should a
table have lots of rows (unlikely, but may happen).

Here is my code:


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

//Send request to server
var href = $(this).attr('href');
$.get(href);

//Update table to show new layout
var $thisRow = $(this).parents('tr:first');
var $thisTable = $('#main_table');
var $rows = $('#main_table tr');

$thisRow.next().insertBefore($thisRow.prev().prev());
$thisRow.insertBefore( $thisRow.prev().prev().prev());

$rows.each(function(){
$(this).find(".moveup").show();
$(this).find(".movedown").show();
});

$thisTable.find("tr:nth-child(2)").find(".moveup").hide();
$thisTable.find("tr:last").prev().find(".movedown").hide();

return false;
});

Can anyone think of a more efficient way to do this?

Thanks,

Paul


On Jun 16, 8:34 pm, RobG  wrote:
> On Jun 17, 3:46 am, theprodigy  wrote:
>
> > I've been trying for a while to alter the second to last row of a
> > table. I've tried several ways. The number of rows is dynamic so I
> > can't hard code a number into nth-child. I used $rowNeeded =
> > $thisRow.parents('table:first').children().children().length - 1 to
> > get the second to last row, but it doesn't seem like I can pass this
> > variable into nth-child either.
>
> > How can I select the second to last row of a table?
>
> In browsers compliant with the W3C DOM 2 HTML specification, table
> elements have a rows collection that contains all the rows in the
> table.  That collection has a length attribute, so, where - table - is
> a reference to a table element:
>
>   var rows = table.rows;
>   var secondLastRow = rows[rows.length - 2];
>
> Since rows is a live collection, you can get a reference once and keep
> it, it will dynamically updated regardless of how many rows are added
> or removed from the table.  Note that the above will error if there
> are less than two rows in the table, use with care.
>
> --
> Rob


[jQuery] Re: get email and send email?

2009-06-17 Thread waseem sabjee
JQuery is a JavaScript Library.
JavaScript is a form of client side scripting.

PHP is a form of server side scripting.

they are not the same.

JQuery is not a library for PHP, however you can use JQuery and PHP in
combination.

for example.


// this is a JavaScript block of code
$(function() { // note the dollar sign here is not from PHP

/*
 we declare a variable in JavaScript
 the value we are assigning to this variable is from a pre-declared php
variable
 then we just alert it to the user
we are importing the php variable
*/
var myAnswer = ;
alert(myAnswer);

});


On Wed, Jun 17, 2009 at 6:40 PM, inkexit  wrote:

>
> Thanks for all your help guys.  A recomendation is import because I'm
> a complete noob when it comes to web programming.  FWIW, I do have a
> lot of experince with C++ though.
>
> One question.  I thought jQuery was a php library?  One poster here
> said that jQuery will only run in the client's browser, but another
> poster said I could use php on the server side to read email.
> Confused...


[jQuery] live() appears to be invoking handlers at the wrong time under webkit

2009-06-17 Thread Lee Henson

jQuery v1.3.2 rev 6246 (and I just tried with the current nightly
build too - same behaviour)

Given the following html which basically has a button floated over the
top right corner of an image:




X



When I set up a couple of live handlers:

$('.abc .xyz img').live('click', function() {
// handler A
})

$('.abc .xyz button').live('click', function() {
// handler B
})

If I click on the image taking care to not position the cursor over
the bounds of the button, I find both handlers are executed. Am I
doing something wrong? I have even gone to the trouble of adding a
unique class to the img and button elements and changing the handlers
to:

$('.my_unique_img_class').live('click', function() {
// handler A
})

$('. my_unique_button_class').live('click', function() {
// handler B
})

but the behaviour is the same. Interestingly, Firefox works correctly.
Chrome + Safari 4 exhibit the problem.

Cheers!
Lee


[jQuery] Re: get email and send email?

2009-06-17 Thread inkexit

Thanks for all your help guys.  A recomendation is import because I'm
a complete noob when it comes to web programming.  FWIW, I do have a
lot of experince with C++ though.

One question.  I thought jQuery was a php library?  One poster here
said that jQuery will only run in the client's browser, but another
poster said I could use php on the server side to read email.
Confused...


[jQuery] Re: Animating background color

2009-06-17 Thread Jack Killpatrick


You can use this to animate that: http://plugins.jquery.com/project/color

- Jack

Apothem wrote:

I use jQuery 1.3.2 and tried to use:
$('.applied').each(function(){
$(this).css('background-color', '#ff').animate
({backgroundColor: "#000" }, "slow");
});

For some reason, the background doesn't change and my firefox debugs
the error of "NaNpx" a few times. What is wrong?

  





[jQuery] Re: i need solution

2009-06-17 Thread waseem sabjee
you were not very descriptive here.
are you dealing with server side or client side controls

i am amusing you are using a standard select with a textbox

$("#myselectbox").change(function() {

$("#mytextinput").attr({ value: $(this).val() });
});

On Wed, Jun 17, 2009 at 9:38 AM, ransacker  wrote:

>
> how to set selected optionvalue in activeDropDownList in yii to an
> activeTextField
>


[jQuery] Re: Regarding HTML post in jQuery

2009-06-17 Thread waseem sabjee
actually since you are using .NET i would suggest and asp.ent web service
for best performance.

actually i came across a problem where only IE was taking 3 minutes to load,
as it could not handle my ajax post. converting from posting to a page to
posting to a web service sorted out my issue.

I will take you through this step by step.

STEP ONE - Create the Web Service.
in your solution explorer add a new item ( *web service* )
lets call this webservice *data.asmx*

once you create your item you should betaken to your *data.cs* file which
will lie in your *App__Code*

in your *data.cs* file locate this line of code

*// [System.Web.Script.Services.ScriptService]*

un-comment it ( take the the *//* from the starting
what this does is it allows script access to your web service.

lets create a sample web service function

[WebMethod]
public string GetData(string key) {
// basically we going to just return whatever you post.
return key;

}

now lets go to our Default.aspx and write the JQuery


$(function() {

$("#myButton").click(function(e) {
e.preventDefault();

// the ajax magic

$.ajax({
type: "POST", // we are posting a value
url: "data.asmx/GetData", // webservicepath/function
dataType: "Json", // xml web service is Json based
data: " 'key' : 'hello' ",   // variableName : Value
success: function(data) { // on succes do something
alert(data.d); // this will alert hello
},
error: function() { // on error do something
alert("the was an error processing your request");
}
});

});

}


On Wed, Jun 17, 2009 at 12:02 PM, San  wrote:

>
> I want to post some html content on a page through jQuery. If I post
> normal data like "abcd" then it works but when data contains html tags
> like abcd it doesnt work.
>
>
>function ProcessData() {
>var pageData = document.getElementById
> ("MainDiv").innerHTML;
>$.ajax({
>url: "ProcessHTMLData.aspx",
>type: "POST",
>data: pageData,
>//data: "abcd",
>dataType: "html",
>success: function(returnData) {
>alert(returnData);
>}
>});
>return false;
>}
>
>
> Further details and solution can be found at :
> http://acs.somee.com/default.aspx
>
> http://acs.somee.com/default.aspx";>http://acs.somee.com/
> default.aspx
>
> Kindly suggest.
> Regards,
> Sandeep Rana
> rokr...@gmail.com


[jQuery] Re: avoid displaying native browser tooltip on links

2009-06-17 Thread Hector Virgen
You can remove the title attribute from the elements with javascript, and it
won't affect the markup (as seen by search engines and when viewing source):

> $('[title]').removeAttr('title');


--
Hector


On Wed, Jun 17, 2009 at 8:17 AM, Anyulled  wrote:

>
> I have a series of links in my page, all with its title atribute
> filled. The thing is that I don't want the browser to show this title
> whenever i hover those links, but still want to have mi titles in the
> markup
>
> Is there any way to do it?
>
> thanks a lot for your help


[jQuery] Re: Cycle removes background image from thumbnails (pager)

2009-06-17 Thread jonrandahl

Nope, Thanks Mike, I tried that and the clearType: false as this is
specific to IE.

I can send you a link via PM if you send me your email again?

Thanks!
J


[jQuery] Ajax firing at page load

2009-06-17 Thread Greg F

Hi,

This script (below) is firing at page load. Are there any ideas how
not to get it to fire until and event happens. Thanks for the help.

Greg

$(document).ready(function () {
if($('#DrainStackDiameter').val() != null){
$('#PowerPipeConfigurations').change(function(){ getResults
(); }).change();
$('#TotalApartmentsServed').blur(function(){ getResults(); }).blur();
$('#TotalWashroomsPerApartment').blur(function(){ getResults(); }).blur
();
$('#TotalPowerPipeUnits').blur(function(){ getResults(); }).blur();
$('#DrainStackLength').blur(function(){ getResults(); }).blur();
$('#DrainStackDiameter').change(function(){ getResults(); }).change();
}
function getResults(){
 var params = {
   PowerPipeConfigurations: $('#PowerPipeConfigurations').val(),
   TotalApartmentsServed: $('#TotalApartmentsServed').val(),
   TotalWashroomsPerApartment:$('#TotalWashroomsPerApartment').val
(),
   TotalPowerPipeUnits: $('#TotalPowerPipeUnits').val(),
   DrainStackLength: $('#DrainStackLength').val(),
   DrainStackDiameter: $('#DrainStackDiameter').val()
 };

 $('#RecommendedPowerPipeModel').load('recommend.php',params);
}



[jQuery] avoid displaying native browser tooltip on links

2009-06-17 Thread Anyulled

I have a series of links in my page, all with its title atribute
filled. The thing is that I don't want the browser to show this title
whenever i hover those links, but still want to have mi titles in the
markup

Is there any way to do it?

thanks a lot for your help


[jQuery] cluetip + livequery (or other rebinding method)

2009-06-17 Thread Chris Hall

Hello everyone.

I've searched and the posts about rebinding cluetip and thought
livequery would be a good option, but it just seems to work on the
first load?

Background:
I'm using the cluetip plugin along with the dataTable plugin.
DataTable is pulling its table info from ajax after the page loads
using this in the ready event:

attributes_Table = $('#attributes').dataTable( {
"bStateSave": true,
"bProcessing": true,
"bPaginate": false,
"bLengthChange": false,
"bFilter": false,
"bSort": false,
"bInfo": false,
"aoColumns": [
{ "sClass": "attr", "sTitle": 
"Attribute" },
{ "sClass": "center", "sTitle": "Level"  }
],
"sAjaxSource": 
'/ajax.php?action=get_attributes&id=122'
} ) ;

cluetip is bound in the ready event using:

$('a.attr').livequery(function(){
$(this).cluetip({
cluetipClass: 'rounded',
dropShadow: false,
positionBy: 'mouse',
arrows: true
})
})


When the page loads, the table is populated correctly and the cluetips
inside the table work great.  But when an ajax call is made to refresh
the table using:

attributes_Table.fnReloadAjax();

cluetip no longer seems to work.  No errors are in the error console.

Is there a way to force livequery to rebind a.attr after I reload the
ajax?

Is there a better way to force the rebind after I reload the ajax?

Any help is greatly appreciated!


[jQuery] Re: jQuery syntax

2009-06-17 Thread cz231

Hi,

Thanks for the reply. After some investigation, I found that in my xml
file it said:



So just for kicks I put dataType:"text/xsl"

And I think I made progress, but I'm not sure. Because now, it creates
the div.panel-previews for each xml node, but for some reason doesn't
fill in any of the children data. And now in firefox, where it was
working perfectly before, is only reading certain children items.

Is there an explanation for this?

Thanks,

Connor



On Jun 16, 1:19 pm, James  wrote:
> IE seems to have a problem with returning the correct header for the
> XML content-type. You'd have to either have the server force the
> content-type text/xml for .xml files, or if generated through a script
> (e.g. PHP) have the script set the header content-type when serving
> the XML.
> I've came upon a Javascript function that can take the returned XML
> and make it XML parse-able, but I can't find it. If you do a search on
> the jQuery groups, you'll come across a lot of posts regarding this IE
> and XML issue.
>
> On Jun 16, 8:03 am, cz231  wrote:
>
> > Hi,
>
> > I've been working on a project that uses xml. But for some reason, it
> > does not work in internet explorer. And after hours and hours of
> > debugging, I cannot figure out why. I would deeply appreciate it if
> > you could help me. I hope this isn't asking too much, but what is
> > wrong from the code below? (I'm hoping I'm just blind and someone sees
> > it right away)
>
> > $(function() {
>
> >             $.ajax({
> >                 type: "GET",
> >                 url: "videos.xml",
> >                 dataType: "xml",
> >                 success: function(xml) {
>
> >                     $(xml).find('item').each(function(){
> >                         var thumb = $(this).children
> > ("description").text();
> >                                                 var title = $
> > (this).children("title").text();
> >                                                 var text = $
> > (this).children("content").text();
> >                                                 var link = $
> > (this).children("link").text();
> >                         $('')
> >                             .html( thumb + '' + title + ' > h1>' + text + 'Watch > class="articlelink" title="Click here to read more">View Article')
> >                             .appendTo('.accordion-padding');
> >                     }); //close each(
> >                 }
> >             }); //close $.ajax(
>
> >     }); //close $(
>
> > Thankyou very much,
>
> > Connor


[jQuery] jQuery returns [object Object] on a blank page -- i am a newbie please help

2009-06-17 Thread Joaquim

HI,

i am trying to build a bookmarklet using jQuery to display a form in
an overlay. The overlay displays displays correctly if I execute the
code from a file. But once i move it to the href of a link, it returns
a blank page with the javascript in the url and [object Object] in the
body of the page. I am using load() function to load the html and css
required.
I am fairly new to jQuery and this is my first app. in jQuery. I dont
know what i'am doing wrong.
please help.
The following is the code.




Bookmarklet me

I am a P tag




[jQuery] Display data from two columns in ONE jqGrid column

2009-06-17 Thread dev

Hello,

I'm trying to create a grid, using jqGrid-3.4.4, which can display
data from two columns in ONE jqGrid column.

One way to achieve this is to create another data column, on the
SERVER side, with combined data from required columns, and then assign
that column to jqGrid column.

Can this be done in jqGrid on client side ?

Please advise how to achieve the functionality.


Thank You.


[jQuery] Display data from two columns in ONE jqGrid column

2009-06-17 Thread dev

Hello,

I'm trying to create a grid, using jqGrid-3.4.4, which can display
data from two columns in ONE jqGrid column.

One way to achieve this is to create another data column with combined
data from required columns, and then assign that column to jqGrid
column.

Can this be done in jqGrid ? Please advise how to achieve the
functionality.


Thank You.


[jQuery] Re: Cycle removes background image from thumbnails (pager)

2009-06-17 Thread Mike Alsup

Try setting the 'cleartypeNoBg' option to true.

$ss.cycle({
fx: 'fade',
cssBefore: { zIndex: 1 },
timeout: 3000,
speed: 1500,
fit: 1,
cssAfter: { zIndex: 0 } ,
cleartypeNoBg: true
});

On Jun 17, 8:48 am, jonrandahl  wrote:
> Forgot to mention that if I change the background from transparent to
> a color, the color works fine!
> Unfortunately the client likes the opacity of the png so I need the
> png for everything above IE6 [which has it's own quirks css file to
> fix things]!
>
> Thanks again for looking!
> J


[jQuery] (validate) conflicts with (jqmodal)

2009-06-17 Thread Phil909


I'm using both validate 1.5.4 plugin and jqmodal r14 plugin (latest
releases)

When both plugins are loaded the jqmodal plugin fires only one
instance on the first element associated to it.

for example:

head:
http://ajax.googleapis.com/ajax/
libs/jquery/1.3.2/jquery.min.js">




Jquery code:
$("#dialog").jqm({
trigger:'.tickbox',
});

jqmodal placeholder in body:




A
B


Both links should fire a jqmodal, but only A fires. Disable validate
script and both links will launch a jqmodal.


Someone got a idea how to fix this?



[jQuery] Horizontally scroll a table

2009-06-17 Thread michael

Hello all,

Is there a plugin somewhere that will allow a table to horizontally
scroll within a set width?  I could swear I saw this once but can't
find it now.  Basically I'm looking for an Excel-like setup.  I have a
div that's 990px wide and need to constrain a table within that to
keep from going off and having the whole thing scroll horizontally.
Bonus points for freezing one or more columns on the left.  Has anyone
seen this or could anyone provide me with some pointers on getting it
done myself?


[jQuery] Re: Palm Pre and jQuery? Is it possible?

2009-06-17 Thread Stephen Sadowski

Andy,

I would think that this is probably possible. We have an application out
for the Mojo SDK, and as of yet have not seen any real documentation on
developing for WebOS.

According to Page 6 of the available chapter of WebOS rough cuts from
oreilly on Palm's site(http://developer.palm.com/webos_book/book6.html),
WebOS supports DOM Level 2 and various HTML5 functions for data access. 

I'm not terribly interested in purchasing the rough cuts book, but there
may be more info available elsewhere in it.

-Stephen

On Tue, 16 Jun 2009 14:52:25 -0500, "Andy Matthews"
 wrote:
> I watched a slidedeck today which talked about developing for WebOS,
which
> is all based around JavaScript. Does anyone know if it's possible to use
> jQuery for WebOS development?
> 
> 
> andy


[jQuery] Re: Cycle removes background image from thumbnails (pager)

2009-06-17 Thread jonrandahl

Forgot to mention that if I change the background from transparent to
a color, the color works fine!
Unfortunately the client likes the opacity of the png so I need the
png for everything above IE6 [which has it's own quirks css file to
fix things]!

Thanks again for looking!
J


[jQuery] Re: [validate] array name attribute

2009-06-17 Thread Jörn Zaefferer

This may help: 
http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_complex_names_.28brackets.2C_dots.29

Otherwise, please provide some code examples, not just the HTML.

Jörn

On Wed, Jun 17, 2009 at 2:41 AM, warren wrote:
>
> hi,
>
> i am having problem with validation if i would be using an array name
> attribute
>
> 
> Name:  id="applicant_name">*
> Address:  id="applicant_address">*
> Company Name:  id="company_name">*
> Company Address:  id="company_address">*
> 
>
> with all fields required, jquery validate is not validating this one.
> how would i get this working?
>
> thanks..
>


[jQuery] Re: Converting objects to strings

2009-06-17 Thread gdfox

Thanks Steve that did the trick.

Greg

Actually, I want to both key/value.

On Jun 16, 9:05 pm, Steven Yang  wrote:
> I think what you want i something likevar params = {
>        TotalApartmentsServed: $('#TotalApartmentsServed').val(),
>
>  TotalWashroomsPerApartment:$('#TotalWashroomsPerApartment').val(),
>                TotalPowerPipeUnits: $('#TotalPowerPipeUnits').val(),
>                DrainStackLength: $('#DrainStackLength').val(),
>                DrainStackDiameter: $('#DrainStackDiameter').val()
>        };
>
> i think you only want to submit the value of the fields back to server
> right? not the entire elements


[jQuery] Cycle removes background image from thumbnails (pager)

2009-06-17 Thread jon randahl

Right, here goes:

I'm using a modified "jQuery Cycle Plugin - 'goto' Demo 2 (aka: Poor
Man's pager)" implementation of the Cycle plugin, this works fine in
FF2+, Op9, Saf3+ and Chrome2 but in IE cycle stops the background-
image from repeating!

As usual I cannot give out a public link due to NDA but I can give you
these two image locations to see the differences:

http://area51.slnmedia.com/cycle/cycle-issue-ff.jpg
http://area51.slnmedia.com/cycle/cycle-issue-ie.jpg

Finally, thank you for reading up to this point, hopefully together we
can sort this out!

Jon

Here is my current code.

html:







css:
#gallery { width: 738px; float: right; position: relative; text-
align: center; }
#gallery #thumbnails { position: absolute; top: 0; left: 0; 
width:
738px; height: 70px; background: transparent url('/_assets/img/gallery/
fff-50.png') 0 0 repeat !important; z-index: 1000; border-bottom: 1px
solid #c50a33; }
#gallery #thumbs { margin: 0; padding: 5px; width: 728px; 
height:
60px; z-index: 1001; }
#gallery #thumbs li { width: 48px; height: 48px; margin: 5px;
padding:0; float: left; border: 1px solid #fff; }
#gallery #thumbs li a { width: 48px; display: block; }

script:
$('#thumbnails').append('');

var $th = $('#thumbs');
var $ss = $('#slideshow');

// add slides to gallery
for (i = 2; i < 13; i++ ) {
( i < 10 ) ? x = '0' + i : x = i;
$ss.append('');
}

// start the slideshow
$ss.cycle({
fx: 'fade',
cssBefore: {
zIndex: 1
},
timeout: 3000,
speed: 1500,
fit: 1,
cssAfter: {
zIndex: 0
}
});

// add the thumbnails to the DOM
$ss.children().each(function(i) {
( (i+1) < 10 ) ? x = '0' + (i+1) : x = (i+1);
// create thumbnails
$('')
// append it to thumbnail container
.appendTo($th)
// bind click handler
.click(function() {
// cycle to the corresponding slide
$ss.cycle(i);
return false;
});
});



[jQuery] trouble using $.get xml

2009-06-17 Thread MattN

I'm having trouble using remote xml feeds. In this example, I'm trying
to get product id's from drugstore.com's xml feed. Looking at my
console log in Firebug... my get function isn't working.



$(function(){
   $.get('http://xml.drugstore.com/xml.asp?
c=10&b=&k=&SORT=&filter=&type=topsellers&trx=xml&trxp1=10&f=xml', {},
function(xml) {
  console.log('successfully got xml feed');
  $('Details',xml).each(function(i){
 productID = $(this).find('ProductID').text();
 console.log(productID);
  });
   });
});




[jQuery] getJSON long polling and throbber

2009-06-17 Thread BrianGruber

Hey All!

I'm using getJSON to do some cross domain long polling. getJSON calls
a PHP script (running lighttpd) and the PHP script waits until a new
message is there, then sends the data out to the waiting getJSON
request.

All works well, but the browser "throbber" keeps spinning while
waiting for getJSON to return! Any idea of how to workaround the
constant spinning?

Regards,

Brian


[jQuery] Star Rating

2009-06-17 Thread Robert Ladd

Hello, this is my first post to the group, so be gentle.  I recently
downloaded the Star Rating plugin and I've got a few questions that I
can't seem to figure out for myself.  If they are there in the
documentation, I apologize for not figuring them out for myself and I
will accept being called an idiot if someone will explain them to me.

I'm using asp.net with MVC.

At this time I will just ask just a couple of question so I don't look
quite so stupid.  If I don't get completely roasted then I'll probably
come back for some of the other things.

For one page I would like to present a star rating that has 5 stars
with the 3rd star as the default selected.  I can do this fine, but I
would like to hide, or at least disable the "Delete" choice.  In other
words if the page is submitted then I want the rating to be 1,2,3,4 or
5.   I don't want it to come back with no rating selected.

Here is the code:




Rating:









The second question I have:  Is it possible to put multiple "Disabled"
star ratings on one page?   What I need to do is display a list of all
of the reviews for an entity in a list format.  I would like to show
the rating associated with each review and allow a user to click on
the specific review and see the detail of the review.  If I have 8
rows in the database, The foreach loop below displays 8x5 stars (40
stars in one line) across the first line and then displays the 8 lines
of details.

Here is the code for this:


<% foreach (var review in Model.Reviews)
   { %>
   
<% if (!Model.IsSingleBusiness)
   { %>
   
   <%= Html.ActionLink(Html.Encode(review.Title),
"Details", new { id = review.ReviewId, eId =
Model.Entity.EntityId })%>
   
 <% } %>
   
   <%= Html.ActionLink("Details", "Details", new { id
= review.ReviewId, eId = Model.Entity.EntityId })%>
   Rating: <%= Html.Encode(review.Rating)%>





   By: <%= Html.Encode(review.Reviewer.FullName)
%>
   
   
   <%= Html.ActionLink(Html.Encode(review.Title),
"Details", new { id = review.ReviewId, eId = Model.Entity.EntityId })
%>
   
   
<% } %>



Thanks in advance for any help.

Robert Ladd



[jQuery] jQuery reallysimplehistory solution

2009-06-17 Thread Paul Dragoonis

Hey there I just wanted to feed back my knowledge and experience with
reallysimplehistory (RSH) and jquery integration.
There were some existing docs but nothing matched the problems i was
looking for.

Firstly, you may think you need to integrate jquery (and json) with
RSH as per their documentation.
This is not the case. jQuery no longer supports JSON in their library,
but as a a separate plugin.
As advised by the guys in #jquery on irc.freenode.net, its better to
use native JSON rather than try to use jquerys implementation of it.
Get json2.js from here: http://www.json.org/json2.js

My problem was that i was getting conflicts and undefined functions
and then suddely, i got a blank page every time and the browser just
sat there and hung. Even a CTRL+F5 didn't fix this i had to restart my
browser(s).
It was due to adding the RSH initialisation function calls from within
my jquery init statement.. like so.
$(document).ready(function() {

window.dhtmlHistory.create( {
debugMode : true,
toJSON: function(o) {
return JSON.stringify(o);
},
fromJSON: function(s) {
return JSON.parse(s);
}
});
window.onload = function(){
dhtmlHistory.initialize();
dhtmlHistory.addListener(historyChange);
};
  });

This is what i was doing, after i stopped trying to use the jquery
JSON calls and use the native JSON calls, i got the blank page and
browser messup.
The solution i found was to keep my RSH stuff outside and before my
jQuery init statement, as it seems RSH must initialise right on page
load and not on document.ready

This is the code i found worked perfectly in stream with jQuery and
native JSON.




window.dhtmlHistory.create( {
debugMode : true,
toJSON: function(o) {
return JSON.stringify(o);
},
fromJSON: function(s) {
return JSON.parse(s);
}
});
window.onload = function(){
dhtmlHistory.initialize();
dhtmlHistory.addListener(historyChange);
};

function historyChange(newLocation, historyData) {
if(newLocation != '') {
console.log('new history: ' + newLocation);
console.log('history data: ' + historyData);
console.log('');
dhtmlHistory.add(newLocation, 'mad stuff');
}
}

$(document).ready(function() {
  ... my jquery code in here and calls to the existing
historyChange() function as needed.
});

I hope this helps anyone and if you want me to clean this up or
correct it in any way let me know. I'll probably get round to making a
RSH/JSON/jQuery tutorial for this at some point.


[jQuery] i need solution

2009-06-17 Thread ransacker

how to set selected optionvalue in activeDropDownList in yii to an
activeTextField


[jQuery] Problem in JQuery_intellisense at VS-08

2009-06-17 Thread Ofer Hashimshony

Hey people I have a bug in Jquert intellisense
When I add the reference to the intellisense file "(jquery-1.3.2-
vsdoc.js)" It worked
But everything when I add
[code] [/
code]

To the page the Jquert intellisense Disappeared . What to do?

[code]









$(document).ready(function(){
$("#btn1").toggle(function(){
alert("Hay 1");
},function(){
alert("Hay 2");
});
});


[/code]
I will be happy to receive help on this topic


[jQuery] [validate] array name attribute

2009-06-17 Thread warren

hi,

i am having problem with validation if i would be using an array name
attribute


Name: *
Address: *
Company Name: *
Company Address: *


with all fields required, jquery validate is not validating this one.
how would i get this working?

thanks..


[jQuery] Problem in JQuery intellisense at VS-08

2009-06-17 Thread Ofer Hashimshony

Hey people I have a bug in Jquert intellisense When I add the
reference to the intellisense file "(jquery-1.3.2-vsdoc.js)" It worked
But everything when I add To the page
[code] /
code
, the Jquert intellisense Disappeared . What to do?

[code]

 


  

 $(document).ready(function(){ $
("#btn1").toggle(function(){ alert("Hay 1"); },function(){ alert("Hay
2"); }); }); 

/code I will be happy to receive help on this topic


[jQuery] jquery like navigation

2009-06-17 Thread scvinodkumar

Hi,

i would like to implement myyearbook.com navigation in my site. You
can see this at the home page itself.

Could you please tell me what type of plugin they used and how to
implement it?



[jQuery] myyearbook navigation

2009-06-17 Thread scvinodkumar

Hi

i would like to implement the myyearbook like navigation.(http://
www.myyearbook.com/) You can see this at the home page itself.

When you click the up or down arrow key, the content being change in
the right hand side.

Please tell me how they have implemented it and what jquery plugin
they have used for this?

Awaiting for your reply..

Thanks for your support


[jQuery] Issue using Scrollpane & simple show / hide / toggle scripts together

2009-06-17 Thread tmc

Hi there,
Hopefully someone can help, I have been using Kelvin Luck's scrollpane
script on a development site and then added in a simple show/hide/
toggle script to change the page's content. This now seems to stop the
scroll bar from being overwritten by the scrollpane script.
Can provide either link to site which is password protected or a copy
of my code.
Reasonably new to jquery but liking it so far :)
Any help would be mucho appreciated.
Thanks
Tim


[jQuery] Cluetip with Image Maps

2009-06-17 Thread Robert

Hi,

I have a small problem with image maps and clueTip.

Client requires 4 map areas on an image (plus the image itself) to
trigger cluetip.

The image itself triggers a sticky clueTip with now Title
2 Map Areas trigger a standard clueTip with custom width with No Title
2 Map Areas trigger the same sticky clueTip as the image with No Title

I almost have this working, the Image itseld triggers properly as to
the first 2 Image Maps as normal clueTips.

But unfortunately the Title is appearing on the 2 Map areas that are
triggering the sticky, even though I have these set to showTitle:
false in both my Javascript in the header as well as the
jquery.clueTip.js

The image itself does not display a title, but this is due to no ALT/
TITLE values being set. Unfortunately the 2 image maps do require ALT/
TITLE values in the HTML, I just don't want them to show up in the
sticky clueTip.

This is my Javascript in the header of the page.
$('area.ref').cluetip({width: '350px', showTitle: false, leftOffset:
-300});

// #sticky is for the whole image when not clicking on the image map
areas
$('#sticky').cluetip({showTitle: false, sticky: true, closePosition:
'top', arrows: false, width: '500px', activation: 'click', topOffset:
100});

// the following is for both image map areas.
 $('area.map').cluetip({splitTitle: ' ', showTitle: false, sticky:
true, closePosition: 'top', arrows: false, width: '500px', activation:
'click', topOffset: -250, leftOffset: -500});

And here is my HTML Code for the image and Image Map.








Any ideas on how I can turn off the Title in the 2 Image Maps that are
triggering the Sticky clueTip?

I've tried everything from hacking the CSS to stripTitle with a " ".

Thanks in advance.

Robert



  1   2   >