AW: [jQuery] Re: [autocomplete] - Problem closing autocomplete

2009-06-04 Thread Wende, Alexander

I found a solution on 
http://stackoverflow.com/questions/609362/jquery-autocomplete-plugin-not-focusing-the-next-clicked-field
 .

The fix is:

Comment out lines 308-310 of the unpacked version:

//if (wasVisible)// position cursor at end of input field
//$.Autocompleter.Selection(input, input.value.length, input.value.length);And 
from Luca's post, comment out line 510:

//input.focus();These both need to be commented out to make it work properly.

It works!!!

-Ursprüngliche Nachricht-
Von: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] Im Auftrag 
von Tom Worster
Gesendet: Donnerstag, 4. Juni 2009 03:14
An: jquery-en@googlegroups.com; Wende, Alexander
Betreff: [jQuery] Re: [autocomplete] - Problem closing autocomplete


On 6/3/09 10:49 AM, AlexKV alexander.we...@kv-rlp.de wrote:

 If the Autocompleter ist active and I click somewhere else on the page
 to close the autocompleter, the autocompleter inputbox will be
 focused. Can I change this behavior? I want that the autocompleter
 will be closed if I click somewhere and that the clicked element will
 be focused.
 The examples on the Demopages have the same behavior.

it's annoying, isn't it? i tried to sort it out and failed. if you find a
solution, please post it here.





[jQuery] plug-in tablesorter bug/anomalies

2009-06-04 Thread barton

The tablesorter plug-in by  Christian Bach has what I think are a
couple of bugs/anomalies.
1) a column that starts with a zero is not identified as a 'digit'. I
think it should be.
2) a column that starts with an IP address that looks like 192.168.1.1
or 1.127.77.1 -- that is any IP with a single digit is not identified
as an IP address because the is function only looks for \d{2,3}
instead of \d{1,3}.
3) some of the examples in the source code are wrong.

Otherwise a great plug-in and worth the effort to debug.


[jQuery] Doubt in setting postions

2009-06-04 Thread MOZ

Hi all,
Just had a doubt this morning...

http://docs.jquery.com/CSS
We have offset() and position() to get the left, top values of an
element relative to document and parent respectively.
Both are working same with FF3 and IE7.

But,
to set the positions i use
$(#element-id).css({'left': 'value', 'top': 'value'});

This sets position relative to document in FF3, but sets relative to
parent element in IE.
My doubt is...
Is there any different functions available to set values relative to
document and parent  - like different functions we have to get values
(offset and position)...?
Or you experts use any other trick to rectify this?

Now i solve this by positioning the element immediate after the body
tag... then the body will be taken as the parent for that element and
works fine in both browsers...

Any other ideas?



[jQuery] IE 8 is different or ?

2009-06-04 Thread Abrar Arshad

hi everybody,

  I am writing a simple line to animate the opacity
through animate() function, not working in IE 8.
  Working fine in FF as usual.

  $(span.al).animate({opacity:0.1});

 Is it a problem with IE 8 or something else...?

 Thanks



[jQuery] Re: JSON- PHP generated JS-file question

2009-06-04 Thread Kristof

yeah i figured that out, but still have some problems though.
I found a way to filter, but its not ideal just yet. It's something i
found on the internet but it works with some sort of array
(respone.values). To receive the objects in the array there is an
other function needed. This just seems way to difficult , there must
be an easier way where i do not need an extra function no?

script language=javascript type=text/javascript

$(function() {
$(input).next(#prijs).hide();
$(#naam).blur(function () {
$.getJSON(producten.js, function(json) {
/* Parse JSON objects */
  jJSON[prijs] = (function() {
response = {
values:[],
};

$.each(json.channel.items,function(i,item) {
if(item.naam == $(#naam).val()){
if (item.prijs != 
undefined) {
response.values = item.prijs;
 
$(#prijs).text(item.prijs);
}
}else{alert(nope code does not 
exist);}
});
return response;
})();
 $(#prijs).show();
});
});
berekenTotaal();
});
var jJSON = {
getValues: function(obj) {
return jJSON[obj][values];
},
};

/script

form action= method= accept-charset=utf-8
pinput type=text id=naam / span id=prijs/span/p
pinput type=submit value=Continue //p
/form pspan id=totaal/span/p

On Jun 3, 1:14 pm, Charlie charlie...@gmail.com wrote:
 you can search the json array with $.each
 var nameWanted = a;
 var data={channel:{items:[{id:1,prijs:10,naam:a},
 {id:2,prijs:5,naam:b},
 {id:3,prijs:22,naam:c}]}}
 $.each(data.channel.items,function(i,item) {
     if (data.channel.items[i].naam == nameWanted) {
     index=i;
         prijsWanted= data.channel.items[i].prijs;
         alert(prijsWanted);
        
     }
 });
 Kristof wrote:i like the idea of building in a treager. each time the user 
 ads a new product or changes a product i could rewrite the new file. Good 
 idea thanks! thanks for the URLs too ! On Jun 2, 8:02 pm, 
 jsuggsjsu...@gmail.comwrote:Look at some of the auto-complete plugins, they 
 do a lot of what you are asking for already including caching of results so 
 that you don't have to do as many lookups or 
 requests.http://plugins.jquery.com/project/autocompletexhttp://plugins.jquery.com/project/js-autocompletehttp://plugins.jquery.com/project/ajax-autocompleteAnd
  yes, having a process run daily to generate the values can be a good idea if 
 you don't need up-to-date values.  One other method is to have a trigger 
 run every time that a new value is added.  That way, when the first item is 
 added the file will be created with just the single item.  You wouldn't have 
 to hit the database again until another item was added and the file 
 overwritten.  Both methods are pretty common practice, but don't overestimate 
 the cost of doing a live database lookup, if you have an index on the column 
 that you are searching through then its impact should be fairly minimal (thus 
 eliminating the need for a more complex solution). On Jun 2, 4:03 am, 
 Kristofkristofstrooba...@gmail.comwrote:Hello, i have just joined this 
 group. First Google group i join ! I'm not native English speaking so sorry 
 if i make some grammar mistakes.Anyway, the past 2 weeks i've been looking 
 into JSON/AJAX functions of jquery. Now the reason for me doing that is that 
 I want to make the following:I want to have an input field that ask you for a 
 code, let's say abc, my script should then automatically search for the 
 price in the database, so with an onblur i suppose.Now i googled/read etc 
 etc, and i came up with a script that worked. It ran a PHP script, generated 
 an array according to the SJON standard that i found on the official 
 website.BUT after re-thinking  what I was doing i thought to myself what if 
 I have a database with 10 000 products. I would load a query each time to 
 search trough these 10 000 products/items.  So I figured there must be a 
 better way. So i came up with the following idea:lets run the PHP scripts 
 one's a day and generate a .JS file containing ALL the products in some sort 
 of array readable for $.getJson(). And this is where I get stuck: how can I 
 read trough the JS file and only select the price of the item of witch I 
 typed in the code abc ?so if I have products.JS generated by PHP-script 
 containing : {channel:{items:[{id:1,prijs:10,naam:a}, 
 {id:2,prijs:5,naam:b}, {id:3,prijs:22,naam:c}]}}how 
 could I select the prijs of product a from that JS-file ? Is it at all 
 possible 

[jQuery] [autocomplete] Textarea up down arrow key usability

2009-06-04 Thread Mountain/\Ash

The autocomplete plugins disables the use of the up and down arrow
keys. In a single line input area this is not an  issue, but on a
textarea it is very noticeable (especially if you are a poor-spller
like I am). I think the arrow keys should only be overridden when the
autocomplete drop-down is visible.

As an example fill the Multiple Birds (remote) example at
http://jquery.bassistance.de/autocomplete/demo/ with Birds can be
fuund all over the wurld, some such birds are: now try and use the
arrow keys to go back and fix the errors.


[jQuery] Triggering asp:Button click event from client side

2009-06-04 Thread Jules

Hi,

I have a page with an asp:Button save that performs an ajax validation
before post back.  If the data is incorrect, the aspx returns a
warning text message.  The user can ignore the warning and continue to
save the data.

I managed to perform the desired result using the posted code below.
Notice that the button click event is called 2 times first when the
user trigger the event, then the 2nd time by target.click() after
setting the doCheck and response values.

I am not happy with the code.  Is there any other way to replace
target.click() with some thing which by pass the validation again?


var doCheck = true;
var response = true;

$(document).ready(function() {
$(input[name$='ajaxConfirm']).bind(click, function(e)
{
var target = $(e.target);

if (doCheck) {

$.get(GetConfirmation.aspx, { param1: test,
param2: data },
function(result) {
if (result != ) {
response = confirm(result);
}
doCheck = false;
target.click();  //replace this
}
, text);

e.preventDefault();
}
else {
if (!response)
e.preventDefault();

doCheck = true;
response = true;
}

});

-- Generated asp:Button

input type=submit name=ctl00$conMain$ajaxConfirm
value=Ajax Confirm id=ctl00_conMain_ajaxConfirm /


[jQuery] Re: BlockUI not always firing

2009-06-04 Thread yang yzh503
usually,when you check your code .which tools can you use .thanks


[jQuery] Inner HTML on a .bind()

2009-06-04 Thread AndyW

My page basically puts in a few YouTube videos on my page

object class=YTV ...param .../paramparam .../paramembed
height= width=.../embed/object
object class=YTV ...param .../paramparam .../paramembed
height= width=.../embed/object
object class=YTV ...param .../paramparam .../paramembed
height= width=.../embed/object


In my document ready function I do the following

$(object.YTV  *).bind('click', function(e){

  alert( $(this).html() );  /* this show the HTML code within the
OBJECT tag */

  var emb1 = $(this).contains(embed).html();
  var emb2 = $(embed, this).html();

  alert( emb1 );
  alert( emb2 );

});


My end goal is to change the width and height of the EMBED ... tag
like they do on FaceBook where when you click on a video, the video
display gets bigger.

Since there are a few of these objects on the page. How in my bind
(click) code do I figure out and update the EMBED tag that is
contained within the OBJECT tag.

If I set the EMBED tag with a unique ID= I can update it, but for the
life of me I'm missing how to parse out the inter HTML code that is
within the OBJECT tag that I can see in my $(this).html() ?

Thanks
Andy


[jQuery] Removing dynamically inserted html

2009-06-04 Thread kristian

I'm trying to dynamically create and remove items from a list, it
works just fine... sort of, I can remove items, and create items, but
once an item has been created, I cannot remove it again, but I can
remove the items present when the page loads.

Here is my code

div class=list
div class=item
input type=text value= / a href=
class=removeitemRemove this item/a
/div
div class=item
input type=text value= / a href=
class=removeitemRemove this item/a
/div
a href= class=additemAdd item to list/a
/div

script type=text/javascript
// Add item to list
$('.additem').click(function(){
var template = $($(this).prev().get(0)).clone();
template.insertBefore($(this));
return false;
});

// Remove item from list
$('.removeitem').click(function(){
$(this).prev().parent().remove();
return false;
});
/script

I can remove the 2 original items, but when I create new ones, they
cannot be removed


[jQuery] Removing dynamically inserted html

2009-06-04 Thread http://kristiannissen.wordpress.com

Why isn't this code working? I can add items but only remove the ones
originally added in the source code, not the ones dynamically added.

form
div class=list
div class=item
input type=text value= / a href=
class=removeitemRemove this item/a
/div
div class=item
input type=text value= / a href=
class=removeitemRemove this item/a
/div
a href= class=additemAdd item to list/a
/div
/form
script type=text/javascript
// Add item to list
$('.additem').click(function(){
var template = $($(this).prev().get(0)).clone();
template.insertBefore($(this));
return false;
});

// Remove item from list
$('.removeitem').click(function(){
$(this).prev().parent().remove();
return false;
});
/script


[jQuery] [validation]

2009-06-04 Thread Petar

Hi guys,

I am trying to have custom error elements for *some* of my input
elements in a form. What approach would you recommend? I tried going
for overriding showErrors but that requires that I need to specify
error elements for all errors, even the ones that are supposed to get
the default one. The method defaultShowErrors does it for all the
error elements, I cannot do it per element, so become unusable in my
scenario.

All ideas are welcome ;)

Best regards,

Petar


[jQuery] Can not use ajax on some server ??

2009-06-04 Thread tongkienphi

HI everybody.

I'm use jquery call php script, on localhost and some server ajax work
well but some server can not run ajax and show error 500 Internal
Server Error. I try replaced jquery become another script ... ajax
work well but it's show error 500 too. You can check here
http://changtraingheo.byethost22.com/ in the colum left and look at
box Chia Sẽ Nhanh and use FireBug test it. I don't know why


[jQuery] UL Hover menu

2009-06-04 Thread TJ

Hi there,

I'm trying to create a hover dropdown many with jQuery and all seems
to work fine in safari but not in ie7?

The idea is that when I hover over the main li the sub ul appears and
slides down. When I hover over the main li is works as planned but
then on ie7 when I move the mouse down to the sub ul is slide back
up???

jQuery:

script type=text/javascript
$(document).ready(function() {
// hide sub menus
$('ul.col_one_subnav').hide();
// toggle sub menus on hover
$('.col_one_navigation li').toggle(function() {
$(this).children('ul:hidden').slideDown();
}, function() {
$(this).children('ul:visible').slideUp();
});
});
/script



HTML:

ul class=col_one_navigation
lia href= title=Blackboard/a
ul class=col_one_subnav
lia href= title=Blackboard/a/
li
lia href= title=Blackboard/
a/li
lia href= title=Blackboard/
a/li
/ul
/li
lia href= title=Placements/a/li
lia href= title=Student Union/a/li
/ul

Can anyone help.

Thanks.

TJ


[jQuery] Re: Textarea up down arrow key usability

2009-06-04 Thread ryan.j

in a forum reply-to textarea or something, then yah, i'd agree that
having no up/down arrowns would be a pain, but for a list of
authorised readers' usernames it's less of an issue.

the contents of the field don't equate to a paragraph of text, but a
number of separate entries, and the whole autocomplete thing means
you're less likely to make a spelling mistake that you only notice
later...

On Jun 4, 6:19 am, Mountain/\\Ash mountain...@gmail.com wrote:
 The autocomplete plugins disables the use of the up and down arrow
 keys. In a single line input area this is not an  issue, but on a
 textarea it is very noticeable (especially if you are a poor-spller
 like I am). I think the arrow keys should only be overridden when the
 autocomplete drop-down is visible.

 As an example fill the Multiple Birds (remote) example 
 athttp://jquery.bassistance.de/autocomplete/demo/with Birds can be
 fuund all over the wurld, some such birds are: now try and use the
 arrow keys to go back and fix the errors.


[jQuery] Re: Can not use ajax on some server ??

2009-06-04 Thread MorningZ

To the server, making an AJAX call is just a normal browser request

And to note, 500 error means something is wrong with your server-side,
in this case PHP, code (hence it's called 500 Internal Server Error)


On Jun 3, 10:11 pm, tongkienphi tongkien...@gmail.com wrote:
 HI everybody.

 I'm use jquery call php script, on localhost and some server ajax work
 well but some server can not run ajax and show error 500 Internal
 Server Error. I try replaced jquery become another script ... ajax
 work well but it's show error 500 too. You can check 
 herehttp://changtraingheo.byethost22.com/in the colum left and look at
 box Chia Sẽ Nhanh and use FireBug test it. I don't know why


[jQuery] Re: plug-in tablesorter bug/anomalies

2009-06-04 Thread MorningZ

It's been 15 months since the last official update... if you simply
search this group, you'll find answers and fixes to both #1 and #2  (i
know I've helped with posts in topics about both)


On Jun 4, 3:00 am, barton bartonphill...@gmail.com wrote:
 The tablesorter plug-in by  Christian Bach has what I think are a
 couple of bugs/anomalies.
 1) a column that starts with a zero is not identified as a 'digit'. I
 think it should be.
 2) a column that starts with an IP address that looks like 192.168.1.1
 or 1.127.77.1 -- that is any IP with a single digit is not identified
 as an IP address because the is function only looks for \d{2,3}
 instead of \d{1,3}.
 3) some of the examples in the source code are wrong.

 Otherwise a great plug-in and worth the effort to debug.


[jQuery] nyromodal and preload of big files

2009-06-04 Thread adudczak

I have a jQuery/nyromodal 1.4 issue. I'm using nyromodal to load
different types of content into an iframed modal dialog. Content is
very diverse starting with jpg's up to 100MB pdf files.

I've observed that nyromodal is doing a somekind of preload of iframe
content (you can observe this in examples at nyromodal website).
Dialog creates not visible iframe which grabs the content from given
URL (and sends first request), after this it makes another request to
the same address. This is fine in most scenarios, but I think this the
reason why Acrobat Reader's activeX gets broken under MSIE when I load
a PDF file. If I open a small website (which redirects) to PDF
everything works fine but if I put a direct reference to PDF it simply
does nothing (modal opens correctly but it's empty). When I open a
really big file number of requests to the same URL is increasing.

Does anyone else came across such a thing? I haven't found any hooks
in nyro documentation but I would gladly turn this preload off.

cheers, Adam




[jQuery] Re: BlockUI not always firing

2009-06-04 Thread MorningZ

To the original poster, i don't have time right now to really delve
deep into your code, but just a quick glance raises the question What
is ReloadPage() supposed to do?...   i would have the feeling judging
by your code that you expect:

- Ajax call be made
- *then* reload the page

that is in no way guarenteed to happen since the Ajax call is done
asynchronously meaning when the code runs, it doesn't wait for
the call to finish before the call is complete and successful

As for:

About the $.ajax, I never use it. Using $.get and $.post is more easy
than using $.ajax. I never got any problems with $.get and $.post 

Just in case you aren't aware, both $.get and $.post both call
$.ajax  :-)

Right from the jQuery file
--

get: function( url, data, callback, type ) {
// shift arguments if data argument was ommited
if ( jQuery.isFunction( data ) ) {
callback = data;
data = null;
}

return jQuery.ajax({
type: GET,
url: url,
data: data,
success: callback,
dataType: type
});
},


post: function( url, data, callback, type ) {
if ( jQuery.isFunction( data ) ) {
callback = data;
data = {};
}

return jQuery.ajax({
type: POST,
url: url,
data: data,
success: callback,
dataType: type
});
},











On Jun 3, 10:38 pm, Donny Kurnia donnykur...@gmail.com wrote:
 Shadraq wrote:
  Donny

  Thanks for the tip about Pastie. I so was not aware of that.

 http://pastie.org/499915

 I have examine your code. Same with my suggestion before, try to define
 $.ajaxStart outside the function, because it just need to defined once
 in a page.

 About the $.ajax, I never use it. Using $.get and $.post is more easy
 than using $.ajax. I never got any problems with $.get and $.post

 I think you must call ReloadPage() and change the l_processing and
 control value inside the callback for ajax call.

 This is the example for login:
 $.post(login.php,
    dataString,
    function(r){
      ReloadPage();
      l_processing = no;
      control = no;
    });

 I Hope it work.

 --
 Donny 
 Kurniahttp://blog.abifathir.comhttp://hantulab.blogspot.comhttp://www.plurk.com/user/donnykurnia


[jQuery] can someone translate this syntax ?

2009-06-04 Thread runrunforest

(function($) {
$.fn.jCarouselLite = function(o) {
o = $.extend({
btnPrev: null,
btnNext: null,
btnGo: null,
mouseWheel: false,
auto: null,

speed: 200,
easing: null,

vertical: false,
circular: true,
visible: 3,
start: 0,
scroll: 1,

beforeStart: null,
afterEnd: null
}, o || {});

return this.each(function() {

var running = false, animCss=o.vertical?top:left,
sizeCss=o.vertical?height:width;
var div = $(this), ul = $(ul, div), tLi = $(li, ul), tl =
tLi.size(), v = o.visible;

});
};

})(jQuery);




I don't understand this part

 var running = false, animCss=o.vertical?top:left,
sizeCss=o.vertical?height:width;
 var div = $(this), ul = $(ul, div), tLi = $(li, ul), tl = tLi.size
(), v = o.visible;

Can you fully translate it for me please.



[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread Andy Matthews

That's called ternary syntax:

(expression) ? True : false;

If the expression evaluates to true, then the true portion is run, else the
false portion is run. A real world example:

Var total = (myValue == 15) ? 15 * 3 : myValue / 2;

Not helpful, but that's how it's used.

As for the other portion, Javascript allows you to set multiples values at
once. Because the author is performing an assignment (animCss = blah), it
doesn't return anything so the value of running is set to false. 


andy


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of runrunforest
Sent: Thursday, June 04, 2009 8:38 AM
To: jQuery (English)
Subject: [jQuery] can someone translate this syntax ?


(function($) {
$.fn.jCarouselLite = function(o) {
o = $.extend({
btnPrev: null,
btnNext: null,
btnGo: null,
mouseWheel: false,
auto: null,

speed: 200,
easing: null,

vertical: false,
circular: true,
visible: 3,
start: 0,
scroll: 1,

beforeStart: null,
afterEnd: null
}, o || {});

return this.each(function() {

var running = false, animCss=o.vertical?top:left,
sizeCss=o.vertical?height:width;
var div = $(this), ul = $(ul, div), tLi = $(li, ul), tl =
tLi.size(), v = o.visible;

});
};

})(jQuery);




I don't understand this part

 var running = false, animCss=o.vertical?top:left,
sizeCss=o.vertical?height:width;
 var div = $(this), ul = $(ul, div), tLi = $(li, ul), tl = tLi.size (),
v = o.visible;

Can you fully translate it for me please.




[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread MorningZ

The commas are just allowing multiple values to be set in one single
line, ie/

var running = false, animCss=o.vertical?top:left

is the same as

var running = false;
var animCss=o.vertical?top:left;

if you don't understand conditional if statements, an example is that
the value of animCss is set to top or left depending on whether
o.vertical evaluates to true or false



On Jun 4, 9:37 am, runrunforest craigco...@gmail.com wrote:
 (function($) {
 $.fn.jCarouselLite = function(o) {
     o = $.extend({
         btnPrev: null,
         btnNext: null,
         btnGo: null,
         mouseWheel: false,
         auto: null,

         speed: 200,
         easing: null,

         vertical: false,
         circular: true,
         visible: 3,
         start: 0,
         scroll: 1,

         beforeStart: null,
         afterEnd: null
     }, o || {});

     return this.each(function() {

         var running = false, animCss=o.vertical?top:left,
 sizeCss=o.vertical?height:width;
         var div = $(this), ul = $(ul, div), tLi = $(li, ul), tl =
 tLi.size(), v = o.visible;

     });

 };
 })(jQuery);

 I don't understand this part

  var running = false, animCss=o.vertical?top:left,
 sizeCss=o.vertical?height:width;
  var div = $(this), ul = $(ul, div), tLi = $(li, ul), tl = tLi.size
 (), v = o.visible;

 Can you fully translate it for me please.


[jQuery] Re: Form Plugin and Validation, I am totally lost even after doing the research.

2009-06-04 Thread johnHoysa

Hmm still seem to be having some issue with it. The code is not
properly posting to sessions.cfm I think. Looking at firebug every
thing seems to be fine but when I then pull back in my tasks.cfm the
data was never written to sessions.cfm properly.

The validation is working currently.

Appreciate the help Gustavo, I think you have me headed on the write
path! Off to do some research.

John


[jQuery] Re: Form Plugin and Validation, I am totally lost even after doing the research.

2009-06-04 Thread johnHoysa

Got it working with the below code! Had to move my validation to the
top of the pre submit calls so it would validate first then do the
rest of the ajax submit I think. Hopefully this works for me!

Again Gustavo thanx for the help!

John

var options = {
//meta: validate,
beforeSubmit:  showRequest,  // pre-submit callback
success:   showResponse,  // post-submit callback
};

function showRequest(formData, jqForm, options) { // pre-submit
callback
$(#myForm).validate({meta: validate})
var formElement = jqForm[0];
return true;
//alert('About to submit');
}

 $('#myForm').ajaxForm(options);

function showResponse(responseText, statusText)  {  // post-submit
callback
$.get('tasks.cfm',{},function(data){
$('#newTasks').html(data);
$('ul:last').fadeIn(slow);
})
//alert('Submitted and should have worked');
}


[jQuery] Re: Can not use ajax on some server ??

2009-06-04 Thread waseem sabjee
Yeah been having this issue on an autocomplete search box of mine.
could it be that the server is denying mulitple requests from that control ?

On Thu, Jun 4, 2009 at 1:39 PM, MorningZ morni...@gmail.com wrote:


 To the server, making an AJAX call is just a normal browser request

 And to note, 500 error means something is wrong with your server-side,
 in this case PHP, code (hence it's called 500 Internal Server Error)


 On Jun 3, 10:11 pm, tongkienphi tongkien...@gmail.com wrote:
  HI everybody.
 
  I'm use jquery call php script, on localhost and some server ajax work
  well but some server can not run ajax and show error 500 Internal
  Server Error. I try replaced jquery become another script ... ajax
  work well but it's show error 500 too. You can check herehttp://
 changtraingheo.byethost22.com/in the colum left and look at
  box Chia Sẽ Nhanh and use FireBug test it. I don't know why



[jQuery] Click event on dynamically-generated link

2009-06-04 Thread fredriley

Sorry to post again to this group, but again jQuery has me stumped on
what seems like a simple task. I've a test doc up at
http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/xml/jquery_xml3.html
and if you click on any of the static links (class=rlo_link) you'll
get an alert, meaning that the $(.rlo_link).click(function() is
being called. Click on the Click here link to generate dynamic links
and then click on those, and no alert appears. Could someone kindly
explain why this is? I can only guess that it's something to do with
the links being generated after the main page has loaded, in response
to an event, but if that's the case I don't know how to access such
dynamically-created elements and events.

What I'm ultimately trying to do is read a XML file (like
http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/xml/ulo_test1.xml)
of link titles and URLs, then allow the user to choose one of those to
display in an iframe. The idea is that a teacher can select some web
resources and display them to students behind a friendly interface. I
could well be going the wrong way about it by using attr(src, url)
to change the iframe target - should I be using load() instead, or
taking another approach altogether?

grumpjQuery is *hard*! If not for all the wonderful plugins and my
sheer obstinacy I'd have given up in despair ages ago, as even to do
the simplest thing you need to fully internalise the whole framework,
and have a comprehensive in-depth understanding of Javascript and the
DOM. /grump

Cheers

Fred


[jQuery] Re: Click event on dynamically-generated link

2009-06-04 Thread waseem sabjee
$(.mylinkclass).live(click, function() {
alert(it Worked);
}):

if that fails try holding this script in one of the xml nodes

script
$(function() {
$(.mylinkclass).live(click, function() {
alert(it Worked);
}):
});
/script

On Thu, Jun 4, 2009 at 4:46 PM, fredriley fred.ri...@gmail.com wrote:


 Sorry to post again to this group, but again jQuery has me stumped on
 what seems like a simple task. I've a test doc up at
 http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/xml/jquery_xml3.htmlhttp://www.nottingham.ac.uk/%7Entzfr/test/ajax/jquery/xml/jquery_xml3.html
 and if you click on any of the static links (class=rlo_link) you'll
 get an alert, meaning that the $(.rlo_link).click(function() is
 being called. Click on the Click here link to generate dynamic links
 and then click on those, and no alert appears. Could someone kindly
 explain why this is? I can only guess that it's something to do with
 the links being generated after the main page has loaded, in response
 to an event, but if that's the case I don't know how to access such
 dynamically-created elements and events.

 What I'm ultimately trying to do is read a XML file (like
 http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/xml/ulo_test1.xmlhttp://www.nottingham.ac.uk/%7Entzfr/test/ajax/jquery/xml/ulo_test1.xml
 )
 of link titles and URLs, then allow the user to choose one of those to
 display in an iframe. The idea is that a teacher can select some web
 resources and display them to students behind a friendly interface. I
 could well be going the wrong way about it by using attr(src, url)
 to change the iframe target - should I be using load() instead, or
 taking another approach altogether?

 grumpjQuery is *hard*! If not for all the wonderful plugins and my
 sheer obstinacy I'd have given up in despair ages ago, as even to do
 the simplest thing you need to fully internalise the whole framework,
 and have a comprehensive in-depth understanding of Javascript and the
 DOM. /grump

 Cheers

 Fred



[jQuery] cycle plugin image positioning issue

2009-06-04 Thread Laker Netman

I am creating a single column fluid layout and have run into an issue
when positioning the images I display via Mike Alsup's cycle plugin.
I dynamically load a content DIV with three other DIVs, one of which
is controlled by the cycle plugin. The other two DIVs are positioned
as expected, however the DIV that cycle is handling has positioning
CSS added to it inline that is pulling it out of my page flow. (When I
disable the cycle code the single image I load first displays as
expected.) Here is the code from that particular DIV:
[start code]

div id=content

div style=position: relative; id=featuredImage
  img style=position: absolute; top: 0px; left: 0px; display: block;
z-index: 5; opacity: 1; src=/images/riverShotWithFisherman.jpg
alt=River scene with fisherman
  img style=position: absolute; top: 0px; left: 0px; display: none;
z-index: 4; opacity: 0; src=/images/3BuiltNReady2.jpg
  img style=position: absolute; top: 0px; left: 0px; display: none;
z-index: 3; opacity: 0; src=/images/waterfall2009.jpg
  img style=position: absolute; top: 0px; left: 0px; display: none;
z-index: 2; opacity: 0; src=/images/FCBlueTrain.jpg
  img style=position: absolute; top: 0px; left: 0px; display: none;
z-index: 1; opacity: 0; src=/images/FCFallTrain.jpg
/div

div id=fp
  img src=/images/fp.gif alt=Featured Product
/div

div id=totm
  img src=/images/totm.gif alt=Tip of the Month
/div

p id=blurb
 Company Info
/p

/div
[end code]

How do I eliminate or override the position: absolute; being
injected into the img tag, as that appears to be the culprit?

I tried applying other CSS to the content wrapper DIV, but to no
avail.

Sorry I can't post a link, as the page is currently on my intranet
beta server.

Thanks,
Laker


[jQuery] A beginerhaving problems with jquery

2009-06-04 Thread BrownPrince

I just started using jquery recently. I do understand the codes and
how they work but i cant understand how to reference external jquery
file in the head section. If you download jquery libraries you see
e.g: jquery.1.2.3.js, but in the tutorials they expect you to refeer
to a certain jquery.js file. Please could someone help me solve this
problem? You could also mail me with t.una...@yahoo.co.uk


[jQuery] Re: A beginerhaving problems with jquery

2009-06-04 Thread waseem sabjee
have you downloaded th Jquery Javascript library from http://jquery.com/ ?

have you added the script refference you your page ?

head
script src=jquery.js/script
/head


not : src is the file path or url path of which folder the script is sitting
in and its' file name

On Thu, Jun 4, 2009 at 1:46 PM, BrownPrince tochiuna...@yahoo.co.uk wrote:


 I just started using jquery recently. I do understand the codes and
 how they work but i cant understand how to reference external jquery
 file in the head section. If you download jquery libraries you see
 e.g: jquery.1.2.3.js, but in the tutorials they expect you to refeer
 to a certain jquery.js file. Please could someone help me solve this
 problem? You could also mail me with t.una...@yahoo.co.uk



[jQuery] Re: A beginerhaving problems with jquery

2009-06-04 Thread MorningZ

And to add to that, the actual name of the js file makes absolutely
no difference  (i think that was the question actually asked by the
original poster)

On Jun 4, 11:04 am, waseem sabjee waseemsab...@gmail.com wrote:
 have you downloaded th Jquery Javascript library fromhttp://jquery.com/?

 have you added the script refference you your page ?

 head
 script src=jquery.js/script
 /head

 not : src is the file path or url path of which folder the script is sitting
 in and its' file name

 On Thu, Jun 4, 2009 at 1:46 PM, BrownPrince tochiuna...@yahoo.co.uk wrote:

  I just started using jquery recently. I do understand the codes and
  how they work but i cant understand how to reference external jquery
  file in the head section. If you download jquery libraries you see
  e.g: jquery.1.2.3.js, but in the tutorials they expect you to refeer
  to a certain jquery.js file. Please could someone help me solve this
  problem? You could also mail me with t.una...@yahoo.co.uk


[jQuery] Re: Click event on dynamically-generated link

2009-06-04 Thread MorningZ

I'd suggest to understand why your dynamic objects are wired up,
thoroughly read this article

http://www.learningjquery.com/2008/03/working-with-events-part-1

understanding why is the solution of fixing your issue

as for

as even to do the simplest thing you need to fully internalise the
whole framework

I'm not exactly sure what internalise the whole framework is
supposed to mean, but I can say from personal experience that I have
been using jQuery for a year and a half now, and i've had to go inside
the jQuery core file *maybe* 4-5 times, and mainly just to learn what
things were doing for my own knowledge

and have a comprehensive in-depth understanding of Javascript and the
DOM

That's simply not true the whole purpose of a framework like
jQuery is so the programmer *doesn't need to* comprehensively
understand JS and the DOM

for instance there's a lot of things that IE does/behaves differently,
but jQuery hides that fact from the programmer

then again, what one is trying to accomplish would have a big factor
in having to know the DOM or advanced script



On Jun 4, 10:46 am, fredriley fred.ri...@gmail.com wrote:
 Sorry to post again to this group, but again jQuery has me stumped on
 what seems like a simple task. I've a test doc up 
 athttp://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/xml/jquery_xml3.html
 and if you click on any of the static links (class=rlo_link) you'll
 get an alert, meaning that the $(.rlo_link).click(function() is
 being called. Click on the Click here link to generate dynamic links
 and then click on those, and no alert appears. Could someone kindly
 explain why this is? I can only guess that it's something to do with
 the links being generated after the main page has loaded, in response
 to an event, but if that's the case I don't know how to access such
 dynamically-created elements and events.

 What I'm ultimately trying to do is read a XML file 
 (likehttp://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/xml/ulo_test1.xml)
 of link titles and URLs, then allow the user to choose one of those to
 display in an iframe. The idea is that a teacher can select some web
 resources and display them to students behind a friendly interface. I
 could well be going the wrong way about it by using attr(src, url)
 to change the iframe target - should I be using load() instead, or
 taking another approach altogether?

 grumpjQuery is *hard*! If not for all the wonderful plugins and my
 sheer obstinacy I'd have given up in despair ages ago, as even to do
 the simplest thing you need to fully internalise the whole framework,
 and have a comprehensive in-depth understanding of Javascript and the
 DOM. /grump

 Cheers

 Fred


[jQuery] Re: cycle plugin image positioning issue

2009-06-04 Thread Mike Alsup

 How do I eliminate or override the position: absolute; being
 injected into the img tag, as that appears to be the culprit?

You can't eliminate it.  For the slideshow to work the container
element must have 'relative' position and the slides must have
'absolute' position inside the container.  I suspect your layout is
having trouble with the relatively positioned div, but you should be
able to sort that out.


[jQuery] Re: Removing dynamically inserted html

2009-06-04 Thread Erdwin Lianata

Because you never bind your dinamically added items.
Try adding new variable function that contains your removing item code,
then re-bind for all .removeitem's item just after you added a new item.

This is what I've done so far:


var ItemRemoveFn = function(event) {
   // Here is your remove item code
   $(this).prev().parent().remove();
   return false;
}

function propagateRemoveItem() {
   $('.removeitem').unbind('click', itemRemoveFn);
   $('.removeitem').bind('click', itemRemoveFn);
}

$(document).ready(function() {
   $('.additem').click(function(){
 var template = $($(this).prev().get(0)).clone();
 template.insertBefore($(this));
 propagateRemoveItem();  // Binding for all items
 return false;
   });
   propagateRemoveItem();  // Binding for static item
});



http://kristiannissen.wordpress.com wrote:
 Why isn't this code working? I can add items but only remove the ones
 originally added in the source code, not the ones dynamically added.
 
 form
 div class=list
 div class=item
 input type=text value= / a href=
 class=removeitemRemove this item/a
 /div
 div class=item
 input type=text value= / a href=
 class=removeitemRemove this item/a
 /div
 a href= class=additemAdd item to list/a
 /div
 /form
 script type=text/javascript
 // Add item to list
 $('.additem').click(function(){
 var template = $($(this).prev().get(0)).clone();
 template.insertBefore($(this));
 return false;
 });
 
 // Remove item from list
 $('.removeitem').click(function(){
 $(this).prev().parent().remove();
 return false;
 });
 /script
 



[jQuery] Re: Click event on dynamically-generated link

2009-06-04 Thread fredriley

On Jun 4, 3:50 pm, waseem sabjee waseemsab...@gmail.com wrote:
 $(.mylinkclass).live(click, function() {
 alert(it Worked);

 }):

Thanks very much for the swift and helpful reply. I'd not come across
'live' before, but looking at the docs http://docs.jquery.com/Events/live
it's plainly what I need, and it works fine :)

Cheers

Fred


[jQuery] Re: UL Hover menu

2009-06-04 Thread Gustavo Salomé
You must to check if the moue moved on its childrens or not, before you
trigger the close action.
Btw, IE sux.

2009/6/4 TJ tho...@atalanta.uk.com


 Hi there,

 I'm trying to create a hover dropdown many with jQuery and all seems
 to work fine in safari but not in ie7?

 The idea is that when I hover over the main li the sub ul appears and
 slides down. When I hover over the main li is works as planned but
 then on ie7 when I move the mouse down to the sub ul is slide back
 up???

 jQuery:

 script type=text/javascript
$(document).ready(function() {
// hide sub menus
$('ul.col_one_subnav').hide();
// toggle sub menus on hover
$('.col_one_navigation li').toggle(function() {
$(this).children('ul:hidden').slideDown();
}, function() {
$(this).children('ul:visible').slideUp();
});
});
 /script



 HTML:

 ul class=col_one_navigation
lia href= title=Blackboard/a
ul class=col_one_subnav
lia href= title=Blackboard/a/
 li
lia href= title=Blackboard/
 a/li
lia href= title=Blackboard/
 a/li
/ul
/li
lia href= title=Placements/a/li
lia href= title=Student Union/a/li
/ul

 Can anyone help.

 Thanks.

 TJ




-- 
Gustavo Salome Silva


[jQuery] Re: [autocomplete] hard time with accent

2009-06-04 Thread Tom Worster

On 6/3/09 11:55 PM, Gustavo Salomé gustavon...@gmail.com wrote:

 No way you can do this unless you do have 'switch' that converts all
 elements to its respective non-utf8 code.

how is the search string encoded in the q parameter sent to the backend?

whatever conversion is needed, isn't it easier to do in the backend than in
client js?


 2009/6/2 Tom Worster f...@thefsb.org
 
 
 On 6/1/09 2:48 PM, Gui guilhermealcant...@gmail.com wrote:
 
 I'm currently using this JQuery autocomplete plugin. It fits my needs,
 pretty cool, however I'm having a hard time with accents. If I type:
 Antonio, the plugin won't retrieve Antônio. I mean, it won't handle
 the special characters (á, à, é, í, ó, ú and so on.)
 
 Is there any option so that it can handle them?
 
 for the local database, i'm not aware of one. if you're using ajax and
 remote back end then maybe you can handle this in your script. if using
 mysql backend, perhaps setting a different collation and tweaking your
 query
 is all you need.
 
 
 
 




[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread runrunforest

thanks man

how about $(ul, div)


[jQuery] Re: Inner HTML on a .bind()

2009-06-04 Thread Gustavo Salomé
Try this:
$('object').click(function(){
  $(this).find('embed').css({width:500px,height:500px});
});

2009/6/4 AndyW awyso...@absoftware.com


 My page basically puts in a few YouTube videos on my page

 object class=YTV ...param .../paramparam .../paramembed
 height= width=.../embed/object
 object class=YTV ...param .../paramparam .../paramembed
 height= width=.../embed/object
 object class=YTV ...param .../paramparam .../paramembed
 height= width=.../embed/object


 In my document ready function I do the following

 $(object.YTV  *).bind('click', function(e){

  alert( $(this).html() );  /* this show the HTML code within the
 OBJECT tag */

  var emb1 = $(this).contains(embed).html();
  var emb2 = $(embed, this).html();

  alert( emb1 );
  alert( emb2 );

 });


 My end goal is to change the width and height of the EMBED ... tag
 like they do on FaceBook where when you click on a video, the video
 display gets bigger.

 Since there are a few of these objects on the page. How in my bind
 (click) code do I figure out and update the EMBED tag that is
 contained within the OBJECT tag.

 If I set the EMBED tag with a unique ID= I can update it, but for the
 life of me I'm missing how to parse out the inter HTML code that is
 within the OBJECT tag that I can see in my $(this).html() ?

 Thanks
 Andy




-- 
Gustavo Salome Silva


[jQuery] Looking for a jquery plugin similiar to this scriptaculous effect...

2009-06-04 Thread williampdx

www.airportbags.com
This sites moving navigation effect is done via scriptaculous and
would much prefer to use a jquery plugin instead.  Does anyone know of
a similiar plugin that would allow for horizontal movement as well as
vertical and allow me to customize the speed and easing???
Anyone suggestions would be much appreciated!
williampdx


[jQuery] NS_ERROR_DOM_BAD_URI with javascript bookmarklet and local path

2009-06-04 Thread Thomas Jaggi

I wrote a script to show a grid overlay using a javascript
bookmarklet. Now OS X throws an error (NS_ERROR_DOM_BAD_URI) when I
try to load the script from a local path (file:///xy). Windows XP (in
Parallels) doesn't have this problem.
Loading it from a webserver works on OS X, too.

Is this related to WebKit and Gecko, to OSX or to something else?

Thanks,
Thomas


[jQuery] Re: Click event on dynamically-generated link

2009-06-04 Thread fredriley

Thanks to you as well for the swift reply.

On Jun 4, 4:04 pm, MorningZ morni...@gmail.com wrote:
 I'd suggest to understand why your dynamic objects are wired up,
 thoroughly read this article

 http://www.learningjquery.com/2008/03/working-with-events-part-1

Thanks, I'll read it carefully.

 understanding why is the solution of fixing your issue

Quite.

 as even to do the simplest thing you need to fully internalise the
 whole framework

 I'm not exactly sure what internalise the whole framework is
 supposed to mean, but I can say from personal experience that I have
 been using jQuery for a year and a half now, and i've had to go inside
 the jQuery core file *maybe* 4-5 times, and mainly just to learn what
 things were doing for my own knowledge

I mean that I have to internalise the conceptual structure of jQuery
in order to use it for the simplest things. I did initially approach
the framework as a possible timesaver, thinking that I could just copy
and adapt a few functions and save myself a lot of JS coding. Well, I
can do that, but in order to use those functions I need to understand
in depth how jQuery works, and to understand that I need a good
understanding of JS and the DOM. The answer that Waseem gave above is
a case in point - I'd never in a hundred years have found the 'live'
construct as a solution to my problem. And yes, I do have the 'hussar'
book.

Maybe it's just me - like human languages, you sometimes come across a
programming language that you really struggle to get your head around,
and jQuery is one of those for me (yes, I know it's not strictly
speaking a language but a framework). It is the dog's bollocks and no
mistake, and it is very handy to have functions which I know will work
in all browsers, and the plugins, especially the UI plugins, are
absolutely excellent and would take a year and a day to replicate in
JS and CSS. And I do appreciate all the hard work the developers and
documentors have put in. But it is not a language to dabble with, as
perhaps Mootools is - you really have to immerse yourself in jQuery to
use it, which means a large time investment at first which I wasn't
prepared for. Now that I have become a little familiar with the thing
I'm just starting to see time savings and productivity improvements,
but it's been a steep hill up to here. After all the time I've put
into it I'm now committed to it, come hell or high water ;-)

Cheers

Fred



[jQuery] Typo

2009-06-04 Thread Phillip Senn

The home page of jQuery plugin: Treeview has a typo: Leightweight .


http://bassistance.de/jquery-plugins/jquery-plugin-treeview/


[jQuery] Sortable Helper and Connected Lists

2009-06-04 Thread Scott

So I noticed a problem when using helpers and connected sortables,
this exists in 1.7.1 not sure about any other version.

Basically if you use a helper and drag an item to a different sortable
which has a different display value set (block vs inline) the item in
the new sortable goes to the display type of the original sortable and
fails to pick up the new style properties even though they're in the
style sheet. It works as expected when no helper is used.

I put together a little demonstration
http://meson.erdc.k12.mn.us/sortable/

Dragging items from the top sortable to the bottom sortable without a
helper they change their display to be block as it should but when you
drag from the bottom sortable to the top with a helper they never pick
up the inline display and thus you get this unexpected result.


[jQuery] Re: Looking for a jquery plugin similiar to this scriptaculous effect...

2009-06-04 Thread Gustavo Salomé
Yes.
Its called scrollTo.

2009/6/4 williampdx wbenning...@gmail.com


 www.airportbags.com
 This sites moving navigation effect is done via scriptaculous and
 would much prefer to use a jquery plugin instead.  Does anyone know of
 a similiar plugin that would allow for horizontal movement as well as
 vertical and allow me to customize the speed and easing???
 Anyone suggestions would be much appreciated!
 williampdx




-- 
Gustavo Salome Silva


[jQuery] Re: Looking for a jquery plugin similiar to this scriptaculous effect...

2009-06-04 Thread williampdx

Thats exactly what I need.  Thanks so much!

On Jun 4, 9:05 am, Gustavo Salomé gustavon...@gmail.com wrote:
 Yes.
 Its called scrollTo.

 2009/6/4 williampdx wbenning...@gmail.com



 www.airportbags.com
  This sites moving navigation effect is done via scriptaculous and
  would much prefer to use a jquery plugin instead.  Does anyone know of
  a similiar plugin that would allow for horizontal movement as well as
  vertical and allow me to customize the speed and easing???
  Anyone suggestions would be much appreciated!
  williampdx

 --
 Gustavo Salome Silva


[jQuery] Re: NS_ERROR_DOM_BAD_URI with javascript bookmarklet and local path

2009-06-04 Thread Thomas Jaggi

Sorry, in Windows XP it only works when visiting local HTML files. On
real websites I'm having the same problem.
But why is it working using any webserver to host the script? I
thought this was cross-domain all the same...


[jQuery] Re: Removing dynamically inserted html

2009-06-04 Thread Stephen Sadowski

Or one could use .live()

$('.removeitem').live(click, 
   function(){
 $(this).prev().parent().remove();
 return false;
 });

So that when an item with class 'removeitem' is created, it is
automatically bound to the click event.

Just a thought!

-S

On Thu, 04 Jun 2009 22:12:00 +0700, Erdwin Lianata
erdwin.lian...@yahoo.com.sg wrote:
 Because you never bind your dinamically added items.
 Try adding new variable function that contains your removing item code,
 then re-bind for all .removeitem's item just after you added a new item.
 
 This is what I've done so far:
 
 
 var ItemRemoveFn = function(event) {
// Here is your remove item code
$(this).prev().parent().remove();
return false;
 }
 
 function propagateRemoveItem() {
$('.removeitem').unbind('click', itemRemoveFn);
$('.removeitem').bind('click', itemRemoveFn);
 }
 
 $(document).ready(function() {
$('.additem').click(function(){
  var template = $($(this).prev().get(0)).clone();
  template.insertBefore($(this));
  propagateRemoveItem();  // Binding for all items
  return false;
});
propagateRemoveItem();  // Binding for static item
 });
 
 
 
 http://kristiannissen.wordpress.com wrote:
 Why isn't this code working? I can add items but only remove the ones
 originally added in the source code, not the ones dynamically added.
 
 form
 div class=list
 div class=item
 input type=text value= / a href=
 class=removeitemRemove this item/a
 /div
 div class=item
 input type=text value= / a href=
 class=removeitemRemove this item/a
 /div
 a href= class=additemAdd item to list/a
 /div
 /form
 script type=text/javascript
 // Add item to list
 $('.additem').click(function(){
 var template = $($(this).prev().get(0)).clone();
 template.insertBefore($(this));
 return false;
 });
 
 // Remove item from list
 $('.removeitem').click(function(){
 $(this).prev().parent().remove();
 return false;
 });
 /script



[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread Andy Matthews

That syntax looks for any ul tag in the context of the div variable (which
would have to be a jQuery variable. That might look like this:

var div = $('#myDiv');
var ulInDiv = $(ul, div);

 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of runrunforest
Sent: Thursday, June 04, 2009 10:54 AM
To: jQuery (English)
Subject: [jQuery] Re: can someone translate this syntax ?


thanks man

how about $(ul, div)




[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread runrunforest

thank you so much


[jQuery] Re: cycle plugin image positioning issue

2009-06-04 Thread Laker Netman



On Jun 4, 10:17 am, Mike Alsup mal...@gmail.com wrote:
  How do I eliminate or override the position: absolute; being
  injected into the img tag, as that appears to be the culprit?

 You can't eliminate it.  For the slideshow to work the container
 element must have 'relative' position and the slides must have
 'absolute' position inside the container.  I suspect your layout is
 having trouble with the relatively positioned div, but you should be
 able to sort that out.

Well after some gnashing-of-teeth and cursing I have it working :)

I googled [some more] and found this posting that gave me the clue I
needed:
http://groups.google.com/group/jquery-en/browse_thread/thread/4123a44fcd3a3d1d

I hadn't set a height and width on the DIV hooked to the cycle plugin
containing the image(s). sigh

Regards,
Laker


[jQuery] Re: Typo

2009-06-04 Thread Jörn Zaefferer

Fixed!

Jörn

On Thu, Jun 4, 2009 at 5:29 PM, Phillip Senn phillips...@gmail.com wrote:

 The home page of jQuery plugin: Treeview has a typo: Leightweight .


 http://bassistance.de/jquery-plugins/jquery-plugin-treeview/



[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread runrunforest

ah one more thing

in  o = $.extend({ afterEnd: null }, o || {});

the  o || {}  means ?


[jQuery] Re: Removing dynamically inserted html

2009-06-04 Thread deltaf

What about just attaching the code you need during insert..

 // Add item to list
 $('.additem').click(function(){
 var template = $($(this).prev().get(0)).clone();
 template.insertBefore($(this));
 return false;
 });

Becomes...

// Add item to list
$('.additem').click(function(){
  var template = $($(this).prev().get(0)).clone();
  template.insertBefore($(this)).click(function(){
$(this).prev().parent().remove();
return false;
  });
  return false;
});

Just bind the same behavior DURING the insert process.. It's probably
cleaner to put the remove() line in its own function and just passing
the ref, but it should be effective.


[jQuery] Re: Inner HTML on a .bind()

2009-06-04 Thread Andy

Actually I finally got it to work using, the part I was missing was I
had to pass in 'this' witht he search otherwise - I'm guessing here -
it was using the document instead of just the section I wanted it to
search.  This gives me the feature that FaceBook has of making the
imbed videos bigger when clicked on. YAY

Gustavo, I couldn't get the CSS working since the width and height
were part of the tag and not the style= section

$(document).ready(function(){

$(object.YTV).unbind( 'click' );
$(object.YTV).bind('click', function(e){

$(this).attr(height, 312);
$(this).attr(width, 384);

$(embed, this).attr(height, 312);
$(embed, this).attr(width, 384);

$(this).unbind( 'click' );

});

});


[jQuery] Re: Accessing generated (= by a jQuery function) links

2009-06-04 Thread madhatter

Hi There,

first of all, sorry for taking so long time to answer the answer :-) I
had to change accounts...

Originally I had written:

  for an introductory article regarding jQuery I have done the obvious
  and shown how to do a slide show of pictures (nothing as fancy as
  lightbox :-). The application consists of 1 HTML, 1 JavaScript and one
  PHP file.

  Provided, I include

         div id=liste
            ul id=fuerbildernumspan class=bildervorsatzBilder/span

 This markup is not good. You shouldn't have anything directly inside
 UL except LI. Doing this may cause unexpected results.

True. I changed it, but as you'll see below that wasn't the problem...


              lia title=Bild 1 von 9 [hafen] href=images/hafen1.jpg1/
  a/li
                ...
              lia title=Bild 9 von 9 [hafen] href=images/hafen9.jpg9/
  a/li
            /ul
         /div

  in the HTML file it starts working just fine. But then I want to
  change this list and have the a element of the picture in question
  removed. Which means I change the div liste in order to have it look
  like

        ...
         lia title=Bild 3 von 9 [hafen] href=images/hafen3.jpg3/a/
  li
         li4/li
         lia title=Bild 5 von 9 [hafen] href=images/hafen5.jpg5/a/
  li
       ...

  After having generated this list a click on one of the links only has
  the effect of switching to the image's page.

 Can you clarify this? Do you have some code that removes the A tag?

Yes, now I can clarify this.

  Does this mean that jQuery can not access a generated element (that
  was not part of the original HTML file)? In other words, do functions
  like $.getJSON() not access generated code?

  The JavaScript code that generates the new links inside the ul element
  looks like this

       for (i = 1; i = bdaten.serienlaenge; i++) {
         if (i != bdaten.bildnr) {
           listentext += '\n\tlia title=Bild ' + i + ' von ' +
  laenge + ' [' + serie + '] href=images/hafen' + i  + '.jpg' + i +
  '/a/li';
         } else {
           listentext += '\n\tli' + i + '/li';
         }
       }

 I don't see any click handler there. Please post all of the relevant code.

The mistake, as had to be expected, was mine not jQuery's :-) What I
had done was putting a click handler in the ready function (see
below), which is read once after loading the document.

Unfortunately, though not surprisingly with hindsight, the links I had
jQuery create were not registered after having been created. This
being done outside hte ready function the code worked alright.

Below is the working Javascript file containing a $('#bilder a').click
() within the ready function and again a $('#bilder a').click()
outside of it (in the function zeigeBild).

// beginning of code
$(document).ready(function() {

$('#bilder a').click(function (evt) {
bildrueckgabe($(this), evt);
}); //  $('#bilder a').bind

  $.getJSON('php/bilderserie-num.php', 'bild=1'+'serie=Hafen',
zeigeBild);
}); // Ende von $(document).ready

function bildrueckgabe(objekt, evt) {
  evt.preventDefault();
  var bildnr = objekt.attr('title').substr(5,1);
  var serie = objekt.attr('title').substr(14,5);

  $.getJSON('php/bilderserie-num.php', 'bild='+bildnr+'serie='+serie,
zeigeBild);
}

  function zeigeBild (bdaten) { // Anfang der Funktion zeigeBild
  var listentext = \n\tspan class=\bildervorsatz\Bilder/span
\n\tul id=\fuerbildernum\;

  for (i = 1; i = bdaten.serienlaenge; i++) {
if (i != bdaten.bildnr) {
  listentext += '\n\tlia title=Bild ' + i + ' von ' +
bdaten.serienlaenge + ' [Hafen] href=images/Hafen' + i  + '.jpg' +
i + '/a/li';
} else {
  listentext += '\n\tli' + i + '/li';
}
  }
  listentext += \n/ul;

$('#liste').html(listentext);
$('#einbild').html('img src=\images/'+bdaten.bild[0]+'.jpg\ /
');
$('#bildtext').html(bdaten.text[0]);

$('#bilder a').click(function (evt) {
bildrueckgabe($(this), evt);
}); //  $('#bilder a').bind
  } // Ende der Funktion zeigeBild

// end of code

Sorry for the delay and the admittedly silly mistake...

Best regards,

Henning
aka madhatter


[jQuery] Re: Help on jQuery plugin

2009-06-04 Thread Andrew

Any feedback?

On Jun 3, 11:24 am, Andrew andrew.alcant...@hotmail.com wrote:
 Hi All,

 I have a plug-in that adds onclick event to an element, below is a
 snippet?

 jQuery.fn.showBox = function(options) {
   var options = {title:the title,content:the content};
return this.each(function(){
 var obj = $(this);
 obj.bind(click,function(e){
 // perform dynamic div show
 // add and show a div box below element
 });
 });

 }

 Now here is my question, is there a way I can make the same function
 so that I can call it as a method of jquery without recreating the
 code for adding and showing the div box.

 What I need is to call this showBox (as $.showBox(options)) and will
 perform the dynamic div?

 Any help is much appreciated.

 Thanks.


[jQuery] [treeview] documentation

2009-06-04 Thread Phillip Senn

The documentation for the treeview plugin consists of examples, but I
wonder if anyone has written some narrative about it?


[jQuery] Re: jQuery Cycle Plugin - Prev/Nex inside loop container

2009-06-04 Thread Thomas Arie Setiawan

2009/6/3 Arie thomasa...@gmail.com:

 Hello,

 I tried to use Cycle Plugin, and it works great. I have the Previous
 and Next navigation work without any problem.

 This is the code I have:

 -
 script type=text/javascript
 $(function() {
 $('#feat-container').cycle({
 prev:   '#prev',
 next:   '#next',
 timeout: 8000,  // milliseconds between slide transitions (0 to
 disable auto advance)
 speed: 2000,  // speed of the transition (any valid fx speed value)
 delay: 0
 });
 });
 /script

 div class=feat-container

 div class=featloop
 pAenean lacinia mi et odio scelerisque at ultricies tortor mattis.
 Nullam sit amet mauris velit, a tincidunt purus./p
 /div

 div class=featloop
 pNam fringilla aliquam vehicula. Vivamus ultricies, lacus eget
 interdum rhoncus, ligula metus tempor arcu, eget volutpat nibh dolor
 eget ipsum./p
 /div

 div class=featloop
 pPellentesque habitant morbi tristique senectus et netus et
 malesuada fames ac turpis egestas/p
 /div

 /div

 div class=featnava id=prev href=#img src=prev.gif alt= /
/aa id=next href=#img src=next.gif alt= //aa href=/
 link/to/archives/img src=more.gif alt= //a/div
 -

 Now, how to have the previous and next inside the container? So, on
 each item, there should be a link to next/prev item?

 Thank you!

 regards,

 Arie

Sorry, I think I need to update my question.

From what I've posted, I want to have something like this in the HTML.

--

div class=feat-container

div class=featloop
pAenean lacinia mi et odio scelerisque at ultricies tortor mattis.
Nullam sit amet mauris velit, a tincidunt purus./p
div class=featnava id=prev href=#img src=prev.gif alt= /
/aa id=next href=#img src=next.gif alt= //aa href=/
link/to/archives/img src=more.gif alt= //a/div
/div

div class=featloop
pNam fringilla aliquam vehicula. Vivamus ultricies, lacus eget
interdum rhoncus, ligula metus tempor arcu, eget volutpat nibh dolor
eget ipsum./p
div class=featnava id=prev href=#img src=prev.gif alt= /
/aa id=next href=#img src=next.gif alt= //aa href=/
link/to/archives/img src=more.gif alt= //a/div
/div

div class=featloop
pPellentesque habitant morbi tristique senectus et netus et
malesuada fames ac turpis egestas/p
div class=featnava id=prev href=#img src=prev.gif alt= /
/aa id=next href=#img src=next.gif alt= //aa href=/
link/to/archives/img src=more.gif alt= //a/div
/div

/div



So, in every item, there are navigation to next and previous page. If
there are few things to modify in the script or HTML, which one?
Thank you...

regards,

Arie


[jQuery] [treeview]

2009-06-04 Thread Phillip Senn

If you look at
http://docs.jquery.com/Plugins/Treeview/treeview
the demo is confusing because it shows a folder called New Sublist but
the tree that displays in the demo has a folder called Folder 1.
It's not until you view the source do you realize that the two have
nothing to do with one another.


[jQuery] Selector help

2009-06-04 Thread Dave Maharaj :: WidePixels.com
I am cleaning up some html code and originally i had
li
  div class=loading id=loading_profile/div
  div id=profile
dl class=entry 
  dtProfile Settings/dt
  dd class=skills
?php foreach ($user['Preferences'] as $preference): 
  echo $preference['name'] . ', ';
endforeach; ?
  /dd
/dl
  /div
/li
 
but the DIV inside the LI was too much so I went with adding the id=profile
to LI but script is no longer working 
 
li id=profile
  div class=loading id=loading_profile/div
  div dl class=entry 
  dtProfile Settings/dt
  dd class=skills
?php foreach ($user['Preferences'] as $preference): 
  echo $preference['name'] . ', ';
endforeach; ?
  /dd
/dl
/li
 
SCRIPT:
$(a[class^='edit_']).click(function(){
 var url_id = $(this).attr('href');
 var x = $(this).attr('id').split('_');
 var y = x[0];
 var z = x[1];
  $(#loading_+z).show(fast, function() {
   $(#+z).slideUp( 1000, function(){
$(.edit_+z).hide(0.1, function() {
 $(#+z).load( url_id , function(){
  $(#+z).slideDown( 1000, function() {
   $(#loading_+z).hide(function(){
$(#+z).fadeTo(fast, 1, function() {
 $(#+z).fadeIn(slow);
});  
   }); 
  });
 return false;
 });
});
   });
  });
 });
 
Do i eed to edit the selecot as li#?
 
Dave 


[jQuery] Re: Using Javascript and stylesheets in an element with injected HTML

2009-06-04 Thread Jonathan

You're going to need to have a callback function in the .load that
attachs prettyPhoto() to the newly inserted A.

Something like this (you'll have to make this work but hopefully it'll
point you in the right direction)

$('tr.info_row' + i + ' td').load('movie_info.html', function() {

   $(a).prettyPhoto({});

});





On Jun 3, 7:42 pm, bobthabuilda urbaninj...@yahoo.com wrote:
 http://www.bobthabuilda.net/projects/baytsp/radar/releases_rows_nodat...

 Excuse my poor javascript... it's my first time using it at this
 level, I'm actually an Actionscript native.

 Click on the 'Email Options' link at the top right, a modal window
 opens. Close this window.

 Click on any row, injected HTML appears in a row below. Click on
 'Email To...' link in the injected HTML element. This is intended to
 open another modal window using javascript.

 What do you think ?

 On Jun 3, 4:23 pm, Jonathan jdd...@gmail.com wrote:

  The HTML that was injected with load should automatically pick up any
  styling information. However any JS binds won't work on the injected
  content without a bit of tweaking. Do you have a demo page where we
  can see the problem?

  Also, look up the Live() function in the jQuery docs. This will allow
  you to bind events to Dom nodes that don't exist at initial page
  generation. (such as HTML injected with load)

  On Jun 3, 2:33 pm, bobthabuilda urbaninj...@yahoo.com wrote:

   I have a injected remote HTML file (via the .load() method) in my page
   that needs to use some Javascript functionality and rel stylesheets
   that have already been included in the wrapper page (the HTML page the
   remote HTML file was injected into).

   I thought the injected HTML file would use the already loaded scripts
   and stylesheets in the parent page, however it seems I was wrong.

   I have tried including the rel stylesheets natively to the injected
   HTML by editing the markup however this doesn't seem to do anything.

   How can I do this?

   Any help is appreciated.

   Thanks,

   John


[jQuery] Re: Form Plugin and Validation, I am totally lost even after doing the research.

2009-06-04 Thread johnHoysa

Actually I jumped the gun but hopefully soon I will figure this out.


[jQuery] Re: Selector help

2009-06-04 Thread Stephen Sadowski


Unrelated to your issue, I would consider an effects queue.

Just sayin'

On Thu, 4 Jun 2009 15:17:24 -0230, Dave Maharaj :: WidePixels.com
d...@widepixels.com wrote:
 I am cleaning up some html code and originally i had
 li
   div class=loading id=loading_profile/div
   div id=profile
 dl class=entry 
   dtProfile Settings/dt
   dd class=skills
 ?php foreach ($user['Preferences'] as $preference): 
   echo $preference['name'] . ', ';
 endforeach; ?
   /dd
 /dl
   /div
 /li
  
 but the DIV inside the LI was too much so I went with adding the
 id=profile
 to LI but script is no longer working 
  
 li id=profile
   div class=loading id=loading_profile/div
   div dl class=entry 
   dtProfile Settings/dt
   dd class=skills
 ?php foreach ($user['Preferences'] as $preference): 
   echo $preference['name'] . ', ';
 endforeach; ?
   /dd
 /dl
 /li
  
 SCRIPT:
 $(a[class^='edit_']).click(function(){
  var url_id = $(this).attr('href');
  var x = $(this).attr('id').split('_');
  var y = x[0];
  var z = x[1];
   $(#loading_+z).show(fast, function() {
$(#+z).slideUp( 1000, function(){
 $(.edit_+z).hide(0.1, function() {
  $(#+z).load( url_id , function(){
   $(#+z).slideDown( 1000, function() {
$(#loading_+z).hide(function(){
 $(#+z).fadeTo(fast, 1, function() {
  $(#+z).fadeIn(slow);
 });  
}); 
   });
  return false;
  });
 });
});
   });
  });
  
 Do i eed to edit the selecot as li#?
  
 Dave


[jQuery] Re: [treeview]

2009-06-04 Thread Jörn Zaefferer

The Add!-button adds new elements to the tree, to demo the
add-option. So there definitely is a relation.

Jörn

On Thu, Jun 4, 2009 at 7:41 PM, Phillip Senn phillips...@gmail.com wrote:

 If you look at
 http://docs.jquery.com/Plugins/Treeview/treeview
 the demo is confusing because it shows a folder called New Sublist but
 the tree that displays in the demo has a folder called Folder 1.
 It's not until you view the source do you realize that the two have
 nothing to do with one another.



[jQuery] Re: [autocomplete] hard time with accent

2009-06-04 Thread James

What are you using to do the string matching?
For me, I was using autocomplete to search for something stored in a
MySQL database, and MySQL by default automatically matches even those
strings with accents from non-accented characters. It should either be
the script or the database that handles this conversion/matching.


On Jun 4, 5:51 am, Tom Worster f...@thefsb.org wrote:
 On 6/3/09 11:55 PM, Gustavo Salomé gustavon...@gmail.com wrote:

  No way you can do this unless you do have 'switch' that converts all
  elements to its respective non-utf8 code.

 how is the search string encoded in the q parameter sent to the backend?

 whatever conversion is needed, isn't it easier to do in the backend than in
 client js?

  2009/6/2 Tom Worster f...@thefsb.org

  On 6/1/09 2:48 PM, Gui guilhermealcant...@gmail.com wrote:

  I'm currently using this JQuery autocomplete plugin. It fits my needs,
  pretty cool, however I'm having a hard time with accents. If I type:
  Antonio, the plugin won't retrieve Antônio. I mean, it won't handle
  the special characters (á, à, é, í, ó, ú and so on.)

  Is there any option so that it can handle them?

  for the local database, i'm not aware of one. if you're using ajax and
  remote back end then maybe you can handle this in your script. if using
  mysql backend, perhaps setting a different collation and tweaking your
  query
  is all you need.


[jQuery] Re: Echo html in head with jquery? (code attached)

2009-06-04 Thread James

Have a default CSS link:
link type=text/css rel=stylesheet href=general.css /

// do jquery date calculations
// for example,
var css = 'night.css';
$(link[rel=stylesheet]).attr(href, css);

The above will replace general.css with night.css.

On Jun 4, 6:26 am, jez j...@h4x3d.com wrote:
 Hello,
 I am almost certain one of you guys will have a super quick solution
 to this, but I just can't get it and it is doing my head in:

 I have this piece of code which basically checks on client-side what
 time of the day it is.
 This information should be used to use different stylesheets based
 on the time, e.g.

 =18 will be night.css
 =15 will be afternoon.css, etc.

 however I cannot get to write this piece of html (e.g. link
 rel=stylesheet href=night.css type=text/css media=screen
 title=night charset=utf-8 /) by means of jquery.

 I was able to set the class of body to either night, afternoon,
 noon, etc, but I would rather like a solution where the time is
 translated into night.css, afternoon.css, etc.

 --- see code below ---

 //date
   datetoday = new Date();
   timenow = datetoday.getTime();
   datetoday.setTime(timenow);
   thehour = datetoday.getHours();

   if (thehour = 18)
     $('body').addClass('evening');
   else if (thehour = 15)
     $('body').addClass('afternoon');
   else if (thehour = 12)
     $('body').addClass('noon');
   else if (thehour = 7)
     $('body').addClass('morning');
   else if (thehour = 0)
     $('body').addClass('night');
   else
     $('body').addClass('general');
 //end

 Many thanks in advance for any suggestions and replies!
 Any pointers or brain teasers welcome!


[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread MorningZ

if the value is null, it will assign it as an empty object


On Jun 4, 12:47 pm, runrunforest craigco...@gmail.com wrote:
 ah one more thing

 in  o = $.extend({ afterEnd: null }, o || {});

 the  o || {}  means ?


[jQuery] Re: Can jQuery parse XML locally?

2009-06-04 Thread fredriley

On Jun 2, 6:42 pm, jsuggs jsu...@gmail.com wrote:
 Basic answer, yes.  If you copied and pasted the example html, then
 the url parameter references labels.xml, which would have to reside
 in the same directory as where you saved the html file. Also, don't
 forget that you also need the jquery file it references as well.

 So to more succinctly answer you question.  You will need to have
 three files in your local directory.
 1) The html file.
 2) The jquery file (named jquery.js in that example)
 3) The xml file (named labels.xml)

 That should solve your problem.

After further testing, your solution does solve the problem in Firefox
and Opera but not in IE. So the test at
http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/xml/jquery_xml1.html
works fine in Firefox 3 and Opera online and locally with the click
here link expanding, but fails locally in IE7 and of course there are
no error messages. The following files are in the same directory:

jquery_xml1.html
jquery.js
labels.xml

This isn't the first time by far that IE has knackered my JS code (and
CSS for that matter), and indeed IE routinely adds 50% or more to my
webdev time, but I was hoping that jQuery functions always work cross-
browser. I'm aiming towards something like
http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/xml/jquery_xml2.html
where links read from a XML file are displayed in an iframe.

Any ideas why IE isn't behaving? If I can't get it to behave locally
then this project's off :(

Cheers

Fred


[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread Andy Matthews

The || is or. Whichever is true first is the result.

So this || that would equal this.

But null || that would equal that.


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of runrunforest
Sent: Thursday, June 04, 2009 11:47 AM
To: jQuery (English)
Subject: [jQuery] Re: can someone translate this syntax ?


ah one more thing

in  o = $.extend({ afterEnd: null }, o || {});

the  o || {}  means ?




[jQuery] Re: text of first sibling of a parent...How do I get it

2009-06-04 Thread jake dimano

Thanks Gustavo
I put in a kludge for this just to move on with the project.  But I
will try your suggestion in the near future and let you know.
jake


On Wed, Jun 3, 2009 at 11:38 PM, Gustavo Salomé gustavon...@gmail.com wrote:
 Try this:
 $(#knowndiv').parent('td').prev().prev().html();

 Think thats gonna work out.

 2009/6/3 jake dimano jakedim...@gmail.com

 Mauricio and Ricardo,
 I applied all the suggestions, parent(), parents() and all the other
 functions, but still to no avail.  The weird thing is that when I
 strip out all the styles, attributes and events from the elements and
 reduce the number of trs to less than 10 but keep the structure
 intact, it works!
 At any rate, thanks to all.  Too much effort has gone fruitless at
 this point.  I will have to resort to a different solution altogether.
 jake

 On Wed, Jun 3, 2009 at 2:44 PM, Mauricio (Maujor) Samy Silva
 css.mau...@gmail.com wrote:
  On Wed, Jun 3, 2009 at 11:20 AM, BigAB adamlbarr...@gmail.com wrote:
 
   have you tried
   var myText = $('#knowndiv').parents('tr').find('td:first').text();
   alert(myText);
 
   The TR is really the parent of the TDs, not the table.
 
  For information only.
  I've used parents() not parent().
  parents() means ancestor and table is ancestor of TDs
 
  See: http://docs.jquery.com/Traversing
  Maurício
  -
 
  -Mensagem Original-
  De: Ricardo
  Para: jQuery (English)
  Enviada em: quarta-feira, 3 de junho de 2009 15:15
  Assunto: [jQuery] Re: text of first sibling of a parent...How do I get
  it
 
  There is no reason why you shouldn't get this working with one of the
  examples provided. For the nesting issue, filter with :first:
 
  $('#knowndiv').parents('tr:first').children('td:first').text();
 
  parents(xx:first) is similar to closest(xx), only the latter will also
  try to match the element itself.
 
  On Jun 3, 1:01 pm, jake dimano jakedim...@gmail.com wrote:
  Yes, that is the first thing I did, to no avail. I think all I am
  left with just trudging through this with pure javascript.
  jake
 
  On Wed, Jun 3, 2009 at 11:20 AM, BigAB adamlbarr...@gmail.com wrote:
 
   have you tried
   var myText = $('#knowndiv').parents('tr').find('td:first').text();
   alert(myText);
 
   The TR is really the parent of the TDs, not the table.
 
   On Jun 3, 7:33 am, jake dimano jakedim...@gmail.com wrote:
   Mauricio, your code basically works fine on a simple test page. But
   there is something about my set-up that makes the bit about
  ...



 --
 Gustavo Salome Silva



[jQuery] Re: Problem invoking jqmHide on a jqModal

2009-06-04 Thread ithra


Solved this by providing the modal with an onHide() callback AND by
explicitly removing the overlay and window per the README page 4.
Dolt!


On May 29, 5:37 pm, ithra ithr...@gmail.com wrote:
 I'm trying to convert a Thickbox iframe setup to a jqModal div.  While
 I can load content into a jqModal dialog.  I run into a problem trying
 to explicitly close the dialog.  Per Firebug:

 $(#dialog).jqmHide is not a function
 (9 out of range 6)

 Has anyone ever seen seen this before?  I'm running the latest jqModal
 and FF 3.0.10.  Been beating my head against the wall on this one.

   function hideModal()
   {
     alert( hideModal invoked );

     $('#dialog').jqmHide();
   }

 ...

            $('#dialog').jqm({ajax:URL, onLoad:myLoad,
 ajaxText:myAjaxText });
            $('#dialog').jqmShow();


[jQuery] Re: Help on jQuery plugin

2009-06-04 Thread Jack Killpatrick
I'm not sure I completely understand what you're looking for, but it 
sounds like you're in need of using event delegation so that something 
can be added and will get handled by a click handler that was defined 
before it was added. Here's a good article:


http://www.learningjquery.com/2008/03/working-with-events-part-1

- Jack

Andrew wrote:

Any feedback?

On Jun 3, 11:24 am, Andrew andrew.alcant...@hotmail.com wrote:
  

Hi All,

I have a plug-in that adds onclick event to an element, below is a
snippet?

jQuery.fn.showBox = function(options) {
  var options = {title:the title,content:the content};
   return this.each(function(){
var obj = $(this);
obj.bind(click,function(e){
// perform dynamic div show
// add and show a div box below element
});
});

}

Now here is my question, is there a way I can make the same function
so that I can call it as a method of jquery without recreating the
code for adding and showing the div box.

What I need is to call this showBox (as $.showBox(options)) and will
perform the dynamic div?

Any help is much appreciated.

Thanks.



  




[jQuery] Re: Echo html in head with jquery? (code attached)

2009-06-04 Thread Ricardo

Works fine in FF/IE/Webkit:

$('head').append('link rel=stylesheet type=text/css href=css/
base.css /')

On Jun 4, 1:26 pm, jez j...@h4x3d.com wrote:
 Hello,
 I am almost certain one of you guys will have a super quick solution
 to this, but I just can't get it and it is doing my head in:

 I have this piece of code which basically checks on client-side what
 time of the day it is.
 This information should be used to use different stylesheets based
 on the time, e.g.

 =18 will be night.css
 =15 will be afternoon.css, etc.

 however I cannot get to write this piece of html (e.g. link
 rel=stylesheet href=night.css type=text/css media=screen
 title=night charset=utf-8 /) by means of jquery.

 I was able to set the class of body to either night, afternoon,
 noon, etc, but I would rather like a solution where the time is
 translated into night.css, afternoon.css, etc.

 --- see code below ---

 //date
   datetoday = new Date();
   timenow = datetoday.getTime();
   datetoday.setTime(timenow);
   thehour = datetoday.getHours();

   if (thehour = 18)
     $('body').addClass('evening');
   else if (thehour = 15)
     $('body').addClass('afternoon');
   else if (thehour = 12)
     $('body').addClass('noon');
   else if (thehour = 7)
     $('body').addClass('morning');
   else if (thehour = 0)
     $('body').addClass('night');
   else
     $('body').addClass('general');
 //end

 Many thanks in advance for any suggestions and replies!
 Any pointers or brain teasers welcome!


[jQuery] Re: Selector help

2009-06-04 Thread Charlie





invalid code 

div dl class="entry" 



Dave Maharaj :: WidePixels.com wrote:

  I am cleaning up some html code and
originally i had
  li
 div class="loading" id="loading_profile"/div
 div id="profile"
 dl class="entry" 
 dtProfile Settings/dt
 dd class="skills"
 ?php foreach ($user['Preferences'] as $preference): 
 echo $preference['name'] . ', ';
 endforeach; ?
 /dd
 /dl
 /div
/li
  
  but the DIV inside the LI was too much so I
went with adding the id="profile to LI but script is no longer
working 
  
  li id="profile"
 div class="loading" id="loading_profile"/div
 div dl class="entry" 
 dtProfile Settings/dt
 dd class="skills"
 ?php foreach ($user['Preferences'] as $preference): 
 echo $preference['name'] . ', ';
 endforeach; ?
 /dd
 /dl
/li
  
  SCRIPT:
  $("a[class^='edit_']").click(function(){
var url_id = $(this).attr('href');
var x = $(this).attr('id').split('_');
var y = x[0];
var z = x[1];
$("#loading_"+z).show("fast", function() {
$("#"+z).slideUp( 1000, function(){
$(".edit_"+z).hide(0.1, function() {
$("#"+z).load( url_id , function(){
$("#"+z).slideDown( 1000, function() {
$("#loading_"+z).hide(function(){
$("#"+z).fadeTo("fast", 1, function() {
$("#"+z).fadeIn("slow");
}); 
}); 
});
return false;
});
});
});
});
});
  
  Do i eed to edit the selecot as li#?
  
  Dave






[jQuery] JQuery Form plugin AND DataTables plugin

2009-06-04 Thread brilang

I am using the DataTables Plugin on a table. Each row in the table
contains a form.
I am using the sAjaxSource initialisation option to retrive a JSON
string from the server.
I now want to add the JQuery Form event ajaxform to each form in the
table.
I think I have to use JQuery's Live event but I need some help in
writing the correct javascript for the Live event.
==
Here's my xhtml code right now:
==
table id=datatable
thead
tr class=headerrow
th class=leftActive/th
th class=leftFull Name/th
th class=leftEmail/th
/tr
/thead
tbody

/tbody
/table
script type=text/javascript
!--
//Options for Toggle Forms
var FormOptions = {
beforeSubmit: showToggleRequest,
success: showToggleResponse,
type: 'POST'
};
function showToggleRequest() {
$('#ToggleStatus').css({'background-color': '#99CCFF', 'height':
'20px'}).html('img src=/images/loading.gif width=16 height=16
alt=Updating ... /Updating ...').show();
}
function showToggleResponse(responseText, statusText) {
if (isNaN(responseText)  responseText != '') { //Error
$('#ToggleStatus').css({'background-color': '#FF', 'height':
'20px'}).html(responseText);
} else { //Success
$('#ToggleStatus').css({'background-color': '#99CCFF', 'height':
'20px'}).html('Updated').fadeOut(1000);
}
}
$(document).ready(function() {
$('.listForm').ajaxForm(FormOptions); //turn each .listForm into an
Ajaxified Form
$('#datatable').dataTable( {
sAjaxSource: members-get.cfm/cfoutput
} );
} );
//--
/script

==
Sample JSON returned by members-get.cfm:
==
{ aaData: [
[ form action='/member-toggle.cfm' method='get' class='listForm'
id='MForm1'input type='checkbox' name='Active' id='Active1'
value='True' checked='checked' /input type='hidden' name='ID'
value='1' /input type='submit' name='Submit' value='Submit'
class='submitButton' //form, Jane Doe, j...@example.com ],
[ form action='/member-toggle.cfm' method='get' class='listForm'
id='MForm2'input type='checkbox' name='Active' id='Active2'
value='False' checked='checked' /input type='hidden' name='ID'
value='2' /input type='submit' name='Submit' value='Submit'
class='submitButton' //form, John Doe, j...@example.com ],
[ form action='/member-toggle.cfm' method='get' class='listForm'
id='MForm3'input type='checkbox' name='Active' id='Active3'
value='False' checked='checked' /input type='hidden' name='ID'
value='3' /input type='submit' name='Submit' value='Submit'
class='submitButton' //form, Jack Smith, j...@example.com ],
[ form action='/member-toggle.cfm' method='get' class='listForm'
id='MForm4'input type='checkbox' name='Active' id='Active4'
value='True' checked='checked' /input type='hidden' name='ID'
value='4' /input type='submit' name='Submit' value='Submit'
class='submitButton' //form, Janet Smith,
ja...@example.com ]] }


[jQuery] Superfish menu - how do I get the drop downs to fit the titles?

2009-06-04 Thread AnnaLynne5

Right now this is what I am getting:

http://www.createyourimpact.com/clients/msc/

Go to programs for example - how do I get the drop down boxes to fit?

Thanks!


[jQuery] toggle with a check box to disable/enable inputs

2009-06-04 Thread tashfeen.ekram

I want to in a form be bale to enable or disable portions of the form
when the user clicks ona check box. I have tried two different ways
but neither seems to work...


//the first does not let me even click the check box
   $('#regular').toggle(
function() {
$('#regular-updates-options').removeAttr('disabled');
},
function() {
$('#regular-updates-options').attr('disabled', 
'disabled');
}
);

//this one allows me to click the box but nothing else happens the
form input of interest remains disabled.
$('#pw').click(function() {
if ($('#price-watch').is(':disabled')) {
$('#price-watch').removeAttr('disabled');

}
else {
$('#price-watch').attr('disabled', 'disabled');

}
});


[jQuery] Horizontal Superfish with 100% width

2009-06-04 Thread Per Hansen

Hi,
i've made a horizontal Superfish menu which fills the containing div
entirely, based on the description given here:
http://dizque.lacalabaza.net/temp/full-width-navigation-bar-with-css.html

Basically that is:
#menu { width: 100%; float: left; display: table;}
#menu  ul { display: table-row; }
#menu  ul  li { display: table-cell; min-width: 20%; }

However, this causes the effect of the Supersubs plugin to stop
working.

Is there a way of providing a dynamic submenu width when having a
full width Superfish menu as described above?

Regards,
Per


[jQuery] Selectors only matching first element

2009-06-04 Thread matt

Hi all, I need some help here.  I'm still pretty new to jQuery and
Javascript in general, so apologies if this is a basic question.

All I am trying to do is a simple select all checkbox script.  The
problem is, no matter what I seem to do, only the first element is
matched.

$(input:checkbox).attr(checked, true);

checks the first box only.

Same with:

$(input:checkbox).each(...

I even tried copying this script directly from the jQuery
documentation page:

$(div).css(border,9px solid red);

It applies a red border to the first div on my page.. the example in
the documentation applies it to all divs.

What could be going on here?

Thanks.


[jQuery] Looking to select and morph a class within an id.

2009-06-04 Thread Mrr0ng


The structure of my page goes 

div id=CLVMajorModule
  div class=majorModule
div class=propImageContainer  /div
  /div
/div
div id=PLVMajorModule
  div class=majorModule
div class=propImageContainer  /div
  /div
/div


(poop, the images are being rendered, the code is 
  img src= alt= width=120 height=90 class=propImg
)


I am trying to alter the src of the img element in the first div with id of
CLVMajorModule.  I am a total newb, and am thus not getting it.

Why is this not working?
$(#CLVMajorModule.propImg).attr(
  {
src:image.jpg
  }
);

(I tried searching for an answer, but I fear that I am so newb, I don't know
what exactly to search for.)

Thanks for any help.
-- 
View this message in context: 
http://www.nabble.com/Looking-to-select-and-morph-a-class-within-an-id.-tp23874044s27240p23874044.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jquery tabs 3 - problems to send the hash to url

2009-06-04 Thread Apfel007

Hi, my first posting in this group. Hope someone can give me a hint.

Is it right, that there is no hash sended to the url in jquery TABS
3 by default ? means the hash is not visible in the url? I'm new on
this stuff ...

I've read that I can send the hash with this to url.. select: function
(event,.

.tabs({ selectedClass: 'active', select: function(event, ui)
{ window.location = ui.tab.href; }, cookie: { expires: 0}, fx: fx })

this will send the hash to url, but add it like this mysite#hash AND
the worst thing is, that the tab content is not changing anymore..
Could someone help my to fix this...
Add the hash as an url-segment like this mysite/#hash

Thanks


[jQuery] Superfish: Inconsistent space between 1st level list items

2009-06-04 Thread Jeremy Schultz

http://www.jeremyschultz.com/client/orchardplace/website/beta/

I deployed Superfish for the menu you see at the top of this webpage,
and it works pretty well except I cannot apply a consistent space
around the 1st level list items. margin-right should do the trick but
it doesn't work with any CSS rules I've tried. It looks like the list
items that don't have a 2nd-level ul have the proper margin-left but
those that do have extra space.

Jeremy
jer...@jeremyschultz.com


[jQuery] Binding one function to multiple events causes overwriting?

2009-06-04 Thread CBowles

If I set up some functions like this:

myFunctions = {

  foo: function() {
alert(Foo);
  },

  doFoo: function() {
myFunctions.foo();
  }

}

And then in .ready() make the following calls:

$(window).bind(eventFoo, myFunctions.foo);
$(window).bind(eventBar, myFunctions.foo);

From the documentation, it seems that calling either $(window).trigger
(eventFoo) or $(window).trigger(eventBar) should both cause the
alert box to display.

In practice I'm finding that eventBar is the only thing that works,
and eventFoo does nothing at all. The same thing happens if I stack
the events as $(window).bind(eventFoo eventBar, myFunctions.foo);


In addition, if I change my code as follows, everything works as
expected.

$(window).bind(eventFoo, myFunctions.foo);
$(window).bind(eventBar, myFunctions.doFoo);


It would appear that for some reason the second call is overwriting
the first, but that doesn't make much sense. Have I stumbled on a bug,
or am I doing something wrong?


[jQuery] Re: Echo html in head with jquery? (code attached)

2009-06-04 Thread nvartolomei

http://cse-mjmcl.cse.bris.ac.uk/blog/2005/08/18/1124396539593.html
smth like this?

On 4 июн, 19:26, jez j...@h4x3d.com wrote:
 Hello,
 I am almost certain one of you guys will have a super quick solution
 to this, but I just can't get it and it is doing my head in:

 I have this piece of code which basically checks on client-side what
 time of the day it is.
 This information should be used to use different stylesheets based
 on the time, e.g.

 =18 will be night.css
 =15 will be afternoon.css, etc.

 however I cannot get to write this piece of html (e.g. link
 rel=stylesheet href=night.css type=text/css media=screen
 title=night charset=utf-8 /) by means of jquery.

 I was able to set the class of body to either night, afternoon,
 noon, etc, but I would rather like a solution where the time is
 translated into night.css, afternoon.css, etc.

 --- see code below ---

 //date
   datetoday = new Date();
   timenow = datetoday.getTime();
   datetoday.setTime(timenow);
   thehour = datetoday.getHours();

   if (thehour = 18)
     $('body').addClass('evening');
   else if (thehour = 15)
     $('body').addClass('afternoon');
   else if (thehour = 12)
     $('body').addClass('noon');
   else if (thehour = 7)
     $('body').addClass('morning');
   else if (thehour = 0)
     $('body').addClass('night');
   else
     $('body').addClass('general');
 //end

 Many thanks in advance for any suggestions and replies!
 Any pointers or brain teasers welcome!


[jQuery] Re: Form Plugin and Validation, I am totally lost even after doing the research.

2009-06-04 Thread Bob Schellink


Hi John,

johnHoysa wrote:

Actually I jumped the gun but hopefully soon I will figure this out.




My understanding is that both ajaxSubmit and validate are registered 
on the Form submit event. So both events are fired at the same time. 
Thus when the form's beforeSubmit callback fires, the validation 
already executed. At least that is what I've observed :)


To get both working together I did the following (perhaps you can 
enhance it to fit your needs):



  // Define an indicator for validation success/fail status
  var valid = false;

  // Setup the validation options
  var validationOptions {

  // this callback is invoked on successful validation
  submitHandler: function(form) {
  // we set valid indicator to true
  valid = true;
  },

  // this callback is invoked on failed validation
  invalidHandler: function(form, validator) {
  // we set valid indicator to false
  valid = false;

  } // add further validation options here
  }

  var formOptions {
beforeSubmit:  preSubmit,
// define more form options here
  }

  // The Form preSubmit handler
  function preSubmit(formData, jqForm, options) {
// If form validation failed we return false to stop Form submit
if (!valid) {
return false;
}
  }

// Define
jQuery(#form).validate(validationOptions);
jQuery('#form').ajaxForm(formOptions);


Hope this is helpful.

kind regards

bob



[jQuery] Re: Echo html in head with jquery? (code attached)

2009-06-04 Thread nvartolomei

http://cse-mjmcl.cse.bris.ac.uk/blog/2005/08/18/1124396539593.html
smth like this?

On 4 июн, 19:26, jez j...@h4x3d.com wrote:
 Hello,
 I am almost certain one of you guys will have a super quick solution
 to this, but I just can't get it and it is doing my head in:

 I have this piece of code which basically checks on client-side what
 time of the day it is.
 This information should be used to use different stylesheets based
 on the time, e.g.

 =18 will be night.css
 =15 will be afternoon.css, etc.

 however I cannot get to write this piece of html (e.g. link
 rel=stylesheet href=night.css type=text/css media=screen
 title=night charset=utf-8 /) by means of jquery.

 I was able to set the class of body to either night, afternoon,
 noon, etc, but I would rather like a solution where the time is
 translated into night.css, afternoon.css, etc.

 --- see code below ---

 //date
   datetoday = new Date();
   timenow = datetoday.getTime();
   datetoday.setTime(timenow);
   thehour = datetoday.getHours();

   if (thehour = 18)
     $('body').addClass('evening');
   else if (thehour = 15)
     $('body').addClass('afternoon');
   else if (thehour = 12)
     $('body').addClass('noon');
   else if (thehour = 7)
     $('body').addClass('morning');
   else if (thehour = 0)
     $('body').addClass('night');
   else
     $('body').addClass('general');
 //end

 Many thanks in advance for any suggestions and replies!
 Any pointers or brain teasers welcome!


[jQuery] Re: Selectors only matching first element

2009-06-04 Thread Mauricio (Maujor) Samy Silva

There isn't in HTML Specs a true value for checked attribute.
Try:
$(input:checkbox).attr(checked, checked);
Maurício
  -Mensagem Original- 
  De: matt 
  Para: jQuery (English) 
  Enviada em: quinta-feira, 4 de junho de 2009 18:12
  Assunto: [jQuery] Selectors only matching first element
  ...
  $(input:checkbox).attr(checked, true);

  checks the first box only.



[jQuery] Re: Selectors only matching first element

2009-06-04 Thread matt

Thanks.  Unfortunately this doesn't seem to work either.  The div
example from the page should work as it was copied directly, but it
doesn't.  This is bizarre.

If it helps, I have the tablesorter, validate and maybe even UI
plugins set up here as well.. could one of them be interfering?

On Jun 4, 6:26 pm, Mauricio \(Maujor\) Samy Silva
css.mau...@gmail.com wrote:
 There isn't in HTML Specs a true value for checked attribute.
 Try:
 $(input:checkbox).attr(checked, checked);
 Maurício
   -Mensagem Original-
   De: matt
   Para: jQuery (English)
   Enviada em: quinta-feira, 4 de junho de 2009 18:12
   Assunto: [jQuery] Selectors only matching first element
   ...
   $(input:checkbox).attr(checked, true);

   checks the first box only.


[jQuery] Complicated setup help.

2009-06-04 Thread Dave Maharaj :: WidePixels.com
I have run into a problem.
 
I have
li id=set_1 class=entry
  dl
dtHeading/dt
dd class=skills Sample here/dd
  /dl
/li
div class=edit_profile Edit/div
div class=clear/div
 
li id=set_2 class=entry
  dl
dtHeading/dt
dd class=skills Sample here/dd
  /dl
/li
div class=edit_settings Edit/div
div class=clear/div
 
same thing as above for 3 other sections..
 
Click edit loads an ajax submitted form (jQuery form Plugin from malsup)
into the  li id=set_XXX class=entry/div so all the dl is replaced
by the form..submit and the new dl data is updated.
 
But if a user clicks edit for set 1 then edit for set 2,3,4,and 5 all 5 divs
are updated with forms, the page is now long and ugly and the forms will not
submit. Easiest way would be to close each set+xx if they click on another
edit link but how can i tell a set has an open form and how can i return the
original data?
 
I was thinking of an accordian style setup where if user clicks on another
edit any open sets will be closed.
 
Ideas? Thoughts? Suggestions?
 
thanks,
 
Dave


[jQuery] Rebinding .one() on ajax callback

2009-06-04 Thread Will Olbrys

I'd like to make my buttons clickable once so I use the .one() method
to set up their binding. This way users don't click a form's button
more than once while it is submitting. I thought this would be easy to
do but I cant seem to rebind the button during the error event. I was
hoping I could just call .one() again but it does not seem to work in
all browsers. simplified example below...

$(#mybutton).one(click,null,callajax);

var callajax = function(e){
  $.ajax({
 success: function(data){console.log(yay!);},
 error: function(){//REBIND THE BUTTON}
  })
}

any thoughts on best acheiving this as simply as possible?

Thanks,

will olbrys
willolbrys.com


[jQuery] Re: toggle with a check box to disable/enable inputs

2009-06-04 Thread MorningZ

Got a sample of the HTML?   (like it's hard to tell if #pw is the
checkbox)


On Jun 4, 4:50 pm, tashfeen.ekram tashfeen.ek...@gmail.com wrote:
 I want to in a form be bale to enable or disable portions of the form
 when the user clicks ona check box. I have tried two different ways
 but neither seems to work...

 //the first does not let me even click the check box
    $('#regular').toggle(
                 function() {
                         $('#regular-updates-options').removeAttr('disabled');
                 },
                 function() {
                         $('#regular-updates-options').attr('disabled', 
 'disabled');
                 }
         );

 //this one allows me to click the box but nothing else happens the
 form input of interest remains disabled.
     $('#pw').click(function() {
         if ($('#price-watch').is(':disabled')) {
                 $('#price-watch').removeAttr('disabled');

                 }
         else {
                 $('#price-watch').attr('disabled', 'disabled');

                 }
         });


[jQuery] Re: Complicated setup help.

2009-06-04 Thread Dave Maharaj :: WidePixels.com
OK forget previous post 
 
How can I disable all links with $('a[class^=edit_]') after one is
clicked?
 
what I did was fade the other buttons out when 1 is clicked. But how can I
disable the buttons temporarily?
 
I added$('a[class^=edit_]').attr(disabled,true , function() {  to my
script but thats stops the action and nothing happens after that line is
run.
 
$('a[class^=edit_]').click(function(){
 var url_id = $(this).attr('href');
 var x = $(this).attr('id').split('_');
 var y = x[0];
 var z = x[1];
  
   $('a[class^=edit_]').fadeTo('slow' , 0.25 , function() {
$('a[class^=edit_]').attr(disabled,true , 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 , function() {
 $('#resume_'+z).fadeTo('fast', 1, function() {
  $('#resume_'+z).fadeIn('slow');
  });  
 }); 
});
   return false;
   });
  });
 });
});
   });
   });
 


  _  

From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] 
Sent: June-04-09 8:50 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Complicated setup help.


I have run into a problem.
 
I have
li id=set_1 class=entry
  dl
dtHeading/dt
dd class=skills Sample here/dd
  /dl
/li
div class=edit_profile Edit/div
div class=clear/div
 
li id=set_2 class=entry
  dl
dtHeading/dt
dd class=skills Sample here/dd
  /dl
/li
div class=edit_settings Edit/div
div class=clear/div
 
same thing as above for 3 other sections..
 
Click edit loads an ajax submitted form (jQuery form Plugin from malsup)
into the  li id=set_XXX class=entry/div so all the dl is replaced
by the form..submit and the new dl data is updated.
 
But if a user clicks edit for set 1 then edit for set 2,3,4,and 5 all 5 divs
are updated with forms, the page is now long and ugly and the forms will not
submit. Easiest way would be to close each set+xx if they click on another
edit link but how can i tell a set has an open form and how can i return the
original data?
 
I was thinking of an accordian style setup where if user clicks on another
edit any open sets will be closed.
 
Ideas? Thoughts? Suggestions?
 
thanks,
 
Dave


[jQuery] Re: Selectors only matching first element

2009-06-04 Thread Mauricio (Maujor) Samy Silva
This works here!
Have a look at: http://jsbin.com/awapu/edit
Maurício
  -Mensagem Original- 
  De: matt 
  Para: jQuery (English) 
  Enviada em: quinta-feira, 4 de junho de 2009 19:35
  Assunto: [jQuery] Re: Selectors only matching first element



  Thanks.  Unfortunately this doesn't seem to work either.  The div
  example from the page should work as it was copied directly, but it
  doesn't.  This is bizarre.

  If it helps, I have the tablesorter, validate and maybe even UI
  plugins set up here as well.. could one of them be interfering?

  On Jun 4, 6:26 pm, Mauricio \(Maujor\) Samy Silva
  css.mau...@gmail.com wrote:
   There isn't in HTML Specs a true value for checked attribute.
   Try:
   $(input:checkbox).attr(checked, checked);
   Maurício
   -Mensagem Original-
   De: matt
   Para: jQuery (English)
   Enviada em: quinta-feira, 4 de junho de 2009 18:12
   Assunto: [jQuery] Selectors only matching first element
   ...
   $(input:checkbox).attr(checked, true);
  
   checks the first box only.

[jQuery] Re: Selectors only matching first element

2009-06-04 Thread James

I think something in your HTML may be not formatted correctly.
Usually plug-ins would not interfere with simple selectors like $
(div). What happens if you remove the plugin code and try it?

On Jun 4, 12:35 pm, matt mattseb...@gmail.com wrote:
 Thanks.  Unfortunately this doesn't seem to work either.  The div
 example from the page should work as it was copied directly, but it
 doesn't.  This is bizarre.

 If it helps, I have the tablesorter, validate and maybe even UI
 plugins set up here as well.. could one of them be interfering?

 On Jun 4, 6:26 pm, Mauricio \(Maujor\) Samy Silva

 css.mau...@gmail.com wrote:
  There isn't in HTML Specs a true value for checked attribute.
  Try:
  $(input:checkbox).attr(checked, checked);
  Maurício
    -Mensagem Original-
    De: matt
    Para: jQuery (English)
    Enviada em: quinta-feira, 4 de junho de 2009 18:12
    Assunto: [jQuery] Selectors only matching first element
    ...
    $(input:checkbox).attr(checked, true);

    checks the first box only.


[jQuery] DragDrop Plugin that will allow users drop information on a form to autocomplete

2009-06-04 Thread efet

I have a simple shopping website. Buyers first need to register to
purchase an item. While a buyer proceeds through steps shipping 
payment etc... he is allowed to save some of the information entered
for future use. For instance, John Doe puchased xyz item and while
proceeding through steps he saved the shipping address information for
future use. Next time John Doe passes through steps, on shipping
address information he will see the saved address on the right side in
a box. But he needs to re-enter all the information again. I was
wondering if there is a plugin in JQuery that will allow me offer him
to dragdrop the box (and all information entered to right inputs) on
the form.


[jQuery] Selector not question

2009-06-04 Thread Dave Maharaj :: WidePixels.com
I am trying to disable all links except for the one clicked.
 
$('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);
 
the alert shows edit_profile so e = edit_profile 
 
so i am trying to fade all classes with edit_ somethingto 0.25 except for
edit_profile but its not working.
 
What am I missing?

  
$('a[class^=edit_]:not(e)').fadeTo('slow' , 0.25 , function() {



}):
 
Thanks
 
Dave


[jQuery] Re: Rebinding .one() on ajax callback

2009-06-04 Thread Karl Swedberg

Hi Will,

This should do it:

var callajax = function(){
  $.ajax({
url: 'foo.html', // replace this with your url
success: function(data) {
console.log('yay!');
},
error: bindclick
  });
};

var bindclick = function() {
  $(a).one(click, callajax);
};

bindclick();


--Karl


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




On Jun 4, 2009, at 7:29 PM, Will Olbrys wrote:



I'd like to make my buttons clickable once so I use the .one() method
to set up their binding. This way users don't click a form's button
more than once while it is submitting. I thought this would be easy to
do but I cant seem to rebind the button during the error event. I was
hoping I could just call .one() again but it does not seem to work in
all browsers. simplified example below...

$(#mybutton).one(click,null,callajax);

var callajax = function(e){
 $.ajax({
success: function(data){console.log(yay!);},
error: function(){//REBIND THE BUTTON}
 })
}

any thoughts on best acheiving this as simply as possible?

Thanks,

will olbrys
willolbrys.com




[jQuery] Re: Selector not question

2009-06-04 Thread Mauricio (Maujor) Samy Silva

  -Mensagem Original- 
  De: Dave Maharaj :: WidePixels.com 
  Para: jquery-en@googlegroups.com 
  Enviada em: quinta-feira, 4 de junho de 2009 21:43
  Assunto: [jQuery] Selector not question


  I am trying to disable all links except for the one clicked.

  $('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);

  the alert shows edit_profile so e = edit_profile 

  so i am trying to fade all classes with edit_ somethingto 0.25 except for 
edit_profile but its not working.

  What am I missing?


  $('a[class^=edit_]:not(e)').fadeTo('slow' , 0.25 , function() {
  
  
  
  }):

  Thanks

  Dave

[jQuery] Re: Selector not question

2009-06-04 Thread Mauricio (Maujor) Samy Silva
$('a[class^=edit_]:not(.' + e + ')').fadeTo('slow' , 0.25 , function() {
...
}

Maurício
  -Mensagem Original- 
  De: Dave Maharaj :: WidePixels.com 
  Para: jquery-en@googlegroups.com 
  Enviada em: quinta-feira, 4 de junho de 2009 21:43
  Assunto: [jQuery] Selector not question


  I am trying to disable all links except for the one clicked.

  $('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);

  the alert shows edit_profile so e = edit_profile 

  so i am trying to fade all classes with edit_ somethingto 0.25 except for 
edit_profile but its not working.

  What am I missing?


  $('a[class^=edit_]:not(e)').fadeTo('slow' , 0.25 , function() {
  
  
  
  }):

  Thanks

  Dave

  1   2   >