[jQuery] Select all elements except the first and the 3 last ones?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> Hey folks, I need to select all but the first and the 3 last rows of a table. I found out that the following works: $('table tr:gt(0):not(:last:last:last)') Whoever it does not seem particular elegant to me and jQuery is always (!) elegant, so I'm wondering if one of you could come up with something cooler : ). (I know that giving the elements I'm looking for a class name
[jQuery] Using jQuery to trigger mousedown event of all divs w/in a container div
I dynamically generate a column of divs which are essentially "approve item" buttons depending on the number of items that are returned from the db. I also have a separate div which is I'm trying to use jQuery to trigger the mousedown of all of the approve buttons in the column mentioned above. So if I had say 4 buttons in my column I would have: <div id="container"> <div id="approveBtn" class="button grey" onmousedown="markApproved('<?=$obj['id']?>')">Approve</div> <div id="approveBtn" class="button
[jQuery] Ajax Authentication Question
I'm pulling my hair on this one. It might not be a jQuery issue but just the BROWSER issue. But since I am planning to use jQuery, the issue applies to it as well. First, this is under FIREFOX only. I don't see this behavior with IE and OPERA. But I think maybe it may something by FF design and/or the others don't see it as a "Security issue." I can reduce the issue to this and I'm looking for an answer: - I am using XHR to login and XHR to logout. - The /Logout Url is not work because the Authentication
[jQuery] IE6 ajax oddity
Folks, I have a small blog application at http://www.thomasbaine.com/thetuis.asp The application works fine in IE7 and FF on both the production server (above) and my local development machine. IE6 works fine on my local machine, but fails on the production server. By fail, I mean that ajax calls to the server are not returned. For example, I can post a comment - and it will be stored in the database - but the return ajax stream of data to update the page does not arrive. Similarly, click on the
[jQuery] DOM problems with jQuery's Form Plugin
Hi, The following code works: $(document).ready(function() { // bind 'form2' and provide a simple callback function $('#form2').ajaxForm(function() { alert("DEBUG Test"); }); }); However the following does not: $(document).ready(function() { // bind 'form2' and provide a simple callback function $('#form2').ajaxForm(function() { // Server should send data back in json encoding target: '#container' }); }); No broken responses. My <div id="container"></div> just does
[jQuery] How do child selectors work in jQuery?
Hi, See <http://lab.jeroencoumans.nl/jquery/child-selector.html> It's my understanding that child selectors only select direct children of an element. Thus, $('#test > li') should only select direct descendent <li> elements of #test, not nested <li>'s. This is confirmed with a simple CSS rule. So how come, when I attach a click event to a direct child, it seems to attach itself to all descendents? Regards, Jeroen
[jQuery] unsubscribe
unsubscribe
[jQuery] [OT] NEWS: AjaxRain Updates
<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>Hey everyone,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Looks like ajaxrain.com has gone through some changes, with a bunch of new features:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> * Storing favorites</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
[jQuery] like 'isset'...determining is something exists on the page
I'm trying to determine if soemthing has been set on the page...and if it is do a different action. I have... if ($('a#f_' + ide).siblings().is('img')) { // do this action } else { // do something else } Which looks to see if an image exists in I'm expecting that .is() will return true in some cases but it never does. Am I going about this entirely the wrong way? Thanks
[jQuery] jQuery form, invalid success label?
Hi, Firebug is reporting success: is an invalid label with the following code: $(document).ready(function() { // bind 'form2' and provide a simple callback function $('#form2').ajaxForm(function() { // Server should send data back in json encoding dataType: 'json', success: function() { alert("DEBUG: Testing."); } }); }); Any idea? -sf
[jQuery] ie lost selection in textarea
use 2 plugins fieldSelection and jqModal how save selected state of textarea when i lost focus on field and revert when i need to use them?
[jQuery] Are there click events from dynamically added DOM elements?
Hi, Sorry to bother everyone with what is probably a stupid question, but I am new to JQuery, although loving every second... I have been trying to dynamically add and delete a table row on a click event, using Jquery. I am able to add and delete the row, by clicking on the row above it but I have not successfully been able to close the new row from inside of itself (using a link). I have spent 3 or 4 hours trying all different ways to attach actions to the click event of the link inside my new table
[jQuery] null vs Vriables containing null
This might be slightly off topic, a javascript script question, but its being applied to jQuery. :-) Ok, there is a different in other languages when you do this: var p = null; xyz(null); xyx(p); It depends on the function prototype and how a language binds to the function.. In JavaScript, what is passed to the function xyz: The address of p or the value of p. Thats the nice thing about higher level languages: Programmers don't usually need to worry about it. However, that methodology is also based
[jQuery] .value= / .val()
question: i have following code: why its not possible to write on this way in the city.value? $("#zip_code").blur(function(){ var zip = "zip_code=" + this.value; $.get("?route=Adress/zipCityLookup", zip, function(xml){ --> $("#city").value= $("city", xml).text(); }); }); When i has following code its possible to write on this way in the zip_code.value $("#zip_code").blur(function(){ --> this.value="4563"; }); Why i must use the .val() function? $("#zip_code").blur(function(){ var zip = "zip_code="
[jQuery] AJAX and Http Response Codes
Is there a more "raw" form of .ajax (or get, .post) that will expose the XHR method to the success (or error) handler? I am attempting to convert an application to jQuery that has a proprietary server module that uses a wide range of HTTP status codes for certain nuances on the client. I notice that the XHR is returned when an ajax method is invoked: var xhr = $.get(uri, options.parameters, options.onSuccess, 'xml'); I suppose I could create a new class that encapsulates the ajax call and makes the
[jQuery] how to add jQ$ to be same as $ ?
Hello there, I want to place jQ$ to be same as $ and/or jQuery. just than, I can use jQ$ in case of jQuery when using with other js framework and $() is defined. who can add this and pack it for me. I don't know how the original pack file is to be packed. It is more smore at size than what I pack using packer at http://dean.edwards.name/packer/. thanx for your help.
[jQuery] Select range of table rows
I'm trying to figure out an efficient way to select a range of table rows. What I'd like to do is select perhaps rows 11 through 19. I want to have the selector put the desired rows into the jquery object instead of grabbing all rows and looping through them to operate only on the ones I want. I keep thinking something like this where the .not() sets the range. It seems almost right but I know its not. var firstRow = 11, lastRow = 19; $('#myTable tr').not(':lt(' + firstRow + '), :gt(' + lastRow +
[jQuery] I can't specify the photos width and height
Hi, I have created a jCarousel photo gallery using drupal, it takes the photos dynamically from drupal moduke, its work fine, but i can't control the photos width and height, it takes it as it is stored in drupal module.... what i should do..... furthermore i specified it in my configuration, but it isn't applied.... but the scroll property is applied right... why?!!! jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel({ scroll: 3, itemwidth : 100, itemheight : 80 }); }); Thanks for
jQuery 1.1.4: Faster, More Tests, Ready for 1.2
Hi Everyone - jQuery 1.1.4 has just been released! The full details of this release can be found on the jQuery blog: http://jquery.com/blog/2007/08/24/jquery-114-faster-more-tests-ready-for-12/ Suffice it to say that some significant speed increases, test coverage increases, and API reductions have been made. Please let us know if you encounter any new problems from jQuery 1.1.3.1. --John
[jQuery] FCKEditor (to plugin or not to plugin...) newbie struggling again...
Hi All, I'm having issues getting the FCKEditor plugin to work inside content that is loaded through $('#element').load('mysourceFile.php'); If I use the standard PHP method of including FCKEditor the editors (there are two on the page) are displayed, however when the form is submited (using $('myForm').ajaxsubmit(options);) only the original value that is held in the hidden filed is taken. If I try to use the FCKEditor jquery plugin, nothing other than a blank textarea is displayed. I've tried the
[jQuery] tablesorter 2.0: problems with multiple rows in <thead>
Tablesorter 2.0 rocks! But I think I've uncovered a bug. I have a table with two rows in the <thead> section, but the tablesorter doesn't work on this table. I've narrowed the issue down to the checkCellColSpan() function. If I bypass that function, then everything works correctly. I've discovered that the arr.push (line 302) command is never executed if there is more than one <tr> in the <thead> of the table. Also, I can't figure out why the call to this function at line 268 includes 4 parameters
[jQuery] jQuery and dynamic image album, possible?
Well, I'm sure it's possible, but I'm a newb and could use veteran advice. :-) I have a form which dynamically finds photos upon each GET of the page. So the photos in one page refresh might be different from another depending on actions the user has taken. Here's a sample: http://stevefink.net/photosamp.png (yes I know its pictures of jewelry with cars.com/autotrader.com checkboxes, I don't have as many vehicle photos as jewelry photos in my archives. :P ) Anyhow, is there any util I can use to
[jQuery] removeClass from *any* element
I apply a class called "RedText" to items I need to make stand out to the user. I want to be able to "globally" remove the class from any and all elements on my page within a specific div tag. Is there a "wildcard" selector or some other way to do this: $(wildcard, '#mydiv').removeClass('RedText');
[jQuery] Jcarousel fadeIn and fadeOut
Hi Folks I am impress how jcarousel is easy to setup. <a href="http://sorgalla.com/projects/jcarousel/#Configuration">http://sorgalla.com/projects/jcarousel/#Configuration</a> Congratulations Jan. If I am using scroll: 1, I dont like of scroll effect (right to left) and I prefer use fadeIn and FadeOut between images. Is it possible? How? Regards<br clear="all"> -- Mário
[jQuery] compare two arrays
Is there a jquery way to compare two arrays without looping. like I have an array1 [a,b,1,2,3] and array2 [b,c,d,11 ]. Is there a way like array1.compare(array2). which returns true if atleast one element among the 2 arrays matches. Straight answers are appreciated. Regards, Vijay Potluri -- View this message in context: http://www.nabble.com/compare-two-arrays-tf4344387s15494.html#a12376633 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Live Query with Draggables
Hey guys, I'm having a spot of trouble combining live query with interface draggables, and I'm afraid I don't have the time to study the internals of both plugins (I'm in midst of trying to meet a deadline), so I hope you guys can briefly explain how both work. When I am dragging something, does it move the original element or does it clone it and then move it? For Live Query, how does it determine when something new is added to the DOM? I ask because I have been having trouble using live query with
[jQuery] Keeping a mouseover-triggered animation from running
I am working on a project that includes a group of items arranged in a grid. the powers that be would like for a mouseover event to make the hovered item expand so that more information could be shown and shrink again when the item is unhovered. My first attempt simply did an animate () on the hovered item and another one when it was unhovered. this produced the desired scaling effect, but it also ran into a few problems when the mouse was moved over several items in quick succession. I thought I
[jQuery] slideDown of dd containing a script crashes ie6/ie7: jQuery 1.1.3.1
[apologies if this is a dupe -- i posted this last night and don't see it on the message board] i have a piece of code that makes it so when you click on a dt, it reveals the sibling dd using the slideDown effect. this seems to work fine except one one dt/dd -- in that case, clicking on the dt crashes ie6 and ie7 (on separate computers). i've traced the problem to a script that appears at the end of the dd; this script document.writes a div of content to the page. this script is from an external
[jQuery] I can't specify the photos width and height
Hi, I have created a jCarousel photo gallery using drupal, it takes the photos dynamically from drupal moduke, its work fine, but i can't control the photos width and height, it takes it as it is stored in drupal module.... what i should do..... furthermore i specified it in my configuration, but it isn't applied.... but the scroll property is applied right... why?!!! jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel({ scroll: 3, itemwidth : 100, itemheight : 80 }); }); Thanks for
[jQuery] I can't specify the photos width and height
Hi, I have created a jCarousel photo gallery using drupal, it takes the photos dynamically from drupal moduke, its work fine, but i can't control the photos width and height, it takes it as it is stored in drupal module.... what i should do..... furthermore i specified it in my configuration, but it isn't applied.... but the scroll property is applied right... why?!!! jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel({ scroll: 3, itemwidth : 100, itemheight : 80 }); }); Thanks for
[jQuery] I can't specify the photos width and height
Hi, I have created a jCarousel photo gallery using drupal, it takes the photos dynamically from drupal moduke, its work fine, but i can't control the photos width and height, it takes it as it is stored in drupal module.... what i should do..... furthermore i specified it in my configuration, but it isn't applied.... but the scroll property is applied right... why?!!! jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel({ scroll: 3, itemwidth : 100, itemheight : 80 }); }); Thanks for
[jQuery] document ready shortcut and scoping
If I use the jQuery document.ready shortcut to delay the definition of a javascript function test(), what is the correct way to reference test()? This does not work: jQuery ( function() { function test() {alert('here')} } ); test; // assume that test is defined at this point... I thought it might be something like this, but no joy there either: localJQ = jQuery ( function() { function test() {alert('here')} } ); localJQ.test; ~ ~ Dave
[jQuery] Keyboard Shortcuts (hooking) Plugin
(reposting from plug-in group) Hi all, Last night I rewrote (granted permissions by author) the module shortcut.js (from http://www.openjs.com/scripts/events/keyboard_shortcuts/) as a jQuery plug-in. The syntax is simple: hooking: $.shortcut.add(<shortcut>, <options>, <callback>); unhooking $.shortcut.remove(<shortcut>); for example: $.shortcut.add("Ctrl+a", {propagate: true}, funcRef); The default options are: {type: 'keydown', propagate: false, disableInInput: false, target: document} jQuery.shortcut.add("Ctrl+Shift+2",
[jQuery] img src problem in IE6
$('#fp_menu a').each(function() { dev_id = querySt("dev_id"); $(this).click(function() { new_src = "http://"+this_domain+"/development/images/"+dev_id+"/ floorplan/"+this.id; $('#fp_img').attr({ src: new_src }); }); }); in IE6 src is not changing.its work well in firefox and IE7
[jQuery] DIV clipping or autofit question
I have a <div id="wcResult"> container. Via $.ajax() the success and failure call back do this: $("#wcResult").text(xml.responseText); to display the result. If success, the server sends JSON formatted data. If failure, like uthentication required, HTML is sent. For the JSON data, the div will not clip or autofit the content. It runs off the div border. For the HTML, the div will autofit the content very nicely. I am not completely sure the reason for this, but I believe its related to HTML :-) Comments?
[jQuery] Performance from 1.1.2 to 1.1.4
I am doing some test in order to migrate from 1.1.2 to 1.1.4... and I got some "strange" result. I have two combo, when you chose an item in the first I load the related items in the second one using an ajax call. With 1.1.2 I spend 1 second to load the second combo... With 1.1.4 I spend 8 seconds.... Any explanation?
[jQuery] Trigger global event is slow in 1.1.4
jquery-1.1.4.js line 1520: // Only trigger if we've ever bound an event for it if ( this.global[type] ) jQuery("*").add([window, document]).trigger(type, data); I think "jQuery("*")" is slow when the page contains large amount of elements. This makes some global events very slow ( ajaxStart with blockUI ). In 1.1.3.1, elements with global event are stored in an array. Any ideas?
[jQuery] How to add content "here"?
Greetings, The task: to insert HTML 9via DOM scripting) exactly after the place where the ,script type="text/javascript" src="scriptsource.js"></script> is inserted. Question: how can I get the parent of the <script> tag? Thank you. All the best, Konstantin
[jQuery] ie6/ie7: slideDown doesn't work on <dd> that contains a <script>
strangeness: i have a setup where clicking on a dt causes a sibling dd to slideDown. this works fine *unless* the dd contains a script tag (fwiw, the script tag references a script on another server). when i click on this particular dt, both ie6 and ie7 crash (on different computers). any ideas? [please feel free to point out better ways to do the other things i'm doing too] $(document).ready(function() { var rightCol = $('#right-col'); $('dl dd',rightCol).hide(); var rightColItems = $('dt',rightCol);
[jQuery] Anyone see anything wrong with this validation code from Jorn's plug-in?
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 12 (filtered medium)"> <style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face
Next Page