Why won't this jQuery loop work?
Why won't this work? All I did was put it inside a "while" loop $(document).ready(function(){ var i = 1; while(i <= 9){ $(".mp-men" + i).click(function(){ $("#display").attr("src", "01-bigthumb-" + i ".jpg"); }); ++i; } });
[jQuery] ANN: Books-a-million.com using jQuery
I used to work for the web company who developed the original BAM site, and now a friend of mine is project manager for them. They just released a new version of their website and it uses jQuery: http://www.booksamillion.com/ From the source, it looks like they're really only making use of an accordion plugin, but hey...another notch in the belt of jQuery. From - Mon Jan 4 10:43:33 2010 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Delivered-To: jeresig@gmail.com Received: by 10.151.122.1 with
[jQuery] the event in JQuery
I am working on JQuery event that populate another function when the user clicks the check box, radio buttion and the drop down list. They are all work fine with 'change(fn)'. However the problem i found when i use 'input type text' that get the value from calendar picker. It seems as if 'change' function doesn't work when the value in input type text is changed. The following is code example. (the value in input type is from calendar picker). Html: <div class=searchCalendar> <input type="text" value="26-11-2008"
[jQuery] Superfish Problem
Hi there, Firstly apologies if I've just spammed this list, the message didn't seem to appear after 24 hours within the Google Group when I used the Web interface. I'm a bit of jQuery and Javascript newbie so please bare with me. I've just implement the Superfish menu plugin, using the package available at http://users.tpg.com.au/j_birch/plugins/superfish/#download . All working fine until I introduced some totally unconnected Javascript to the mix, I can only assume there is a conflict but I'm afraid
[jQuery] Superfish help
Hi there, I'm a bit of jQuery and Javascript newbie so please bare with me. I've just implement the Superfish menu plugin, using the package available at http://users.tpg.com.au/j_birch/plugins/superfish/#download . All working fine until I introduced some totally unconnected Javascript to the mix, I can only assume there is a conflict but I'm afraid I'm uncertain how to resolve it. My implementation is: <style type="text/css"> <!-- @import url(css/menu3/superfish.css); --> </style> <script type="text/javascript"
[jQuery] getBoxObjectFor() is deprecated
Well I am getting the same error and I'm not using the flash plugin. Anyone else get this? Ed **Since I can't reopen this old topic** Pete
Simple noob question re: *removing* mouseclick sensing.
Hi - I'm new to JQuery (and pretty new to Javascript) so this is a very simple one probably. I'm wondering if anyone can help and save me several hours of trial and error? I've been using the following JQuery line to toggle whether some text is hidden or shown. It was previously referenced directly by an id= tag on a DIV - i.e. was simply triggered when some other text in a DIV was clicked. $('#slideToggle').click(function(){$(this).siblings('.mover').slideToggle(); However I needed to make this
[jQuery] Replacing DIV with XML
I´m trying to make an dynamic page with XML values. When the visitor click on an item it replaces the content. But it is not doing his job. This is the code:<div> </div><div><div>$('a').click(function() { </div> <div>var key = $(this).attr('id').charAt(4); </div><div>$('a').click(function() {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>var key = $(this).attr('id').charAt(4);</div> <div> $.ajax({</div><div> type: "GET",</div><div> url: "../cms/xmlCinema.php?id=000"+key,</div><div>
[jQuery] IE7: loading XML per ajax
Hello, I tried to load a .svg vector graphic with $.ajax, which works perfectly well in FF and Opera, but not in Internet Explorer. My script looks like this: $(document).ready(function(){ $.ajax({ type: "GET", url: "test.svg", dataType: "xml", success: function(data){ parseSVG(data); }, error: function(xhr, textStatus, errorThrown){ alert (textStatus); } }); }); function parseSVG(svg){ /* function that parses the DOM of the file */ } If I run this in IE7, the error function
[jQuery] is anyone use linkselect on IE brower?
if the select has many option(only more than 200),the page will very delay on page loading,the cpu use will be full.any help?
[jQuery] Selector Help
Code: <fieldset> <a href="" class="link"></a> </fieldset> <fieldset> <a href="" class="link"></a> </fieldset> <fieldset> <a href="" class="link"></a> </fieldset> When a link is clicked, I would like to be able to reference the particular parent fieldset element, and not all of them. Something like this doesn't work: $('.link').click(function () { $(this+':parent').BLAHBLAHBLAH(); }); Thanks in advance, the help here is top notch!
Superfish conflict
Hi there, I'm a bit of jQuery and Javascript newbie so please bare with me. I've just implement the Superfish menu plugin, using the package available at http://users.tpg.com.au/j_birch/plugins ... /#download . All working fine until I introduced some totally unconnected Javascript to the mix, I can only assume there is a conflict but I'm afraid I'm uncertain how to resolve it. My implementation is: <style type="text/css"> <!-- @import url(css/menu3/superfish.css); --> </style> <script type="text/javascript"
[jQuery] Any Fortune 500 using the Google Ajax Hosting?
Hey, I'm implementing jQuery for a fairly large company, and was asked by their team if we knew if anyone in the Fortune 500 was using the Google Ajax hosting: http://code.google.com/apis/ajaxlibs/ They have some IT issues which are preventing proper server configurations in the short term at least, so this was seen as a way to help improve things. However, they seem to be skeptical for some reason... I know some fairly big names are using jQuery, but just wondered if anyone knew of any off hand
How to get the ui.draggable content?
I am a newbie to Jquery and facing difficulty in getting the content of the draggable item. Here's my drop function: drop: function (ev, ui) { alert($(ui.draggable).attr("id")); $(this).append (ui.draggable); } The above alert displays me the ID of the draggable element. But i need to get the contents of the draggable item such that a stored procedure will be called by passing the dragged content as parameter values. Request help in this regard. Thanks
[jQuery] remove doesn't prevent a request for the image
Hi there, It is my goal to defer loading of images in the cycle plugin. Which I have accomplished as follows. But please have a look at the 4th line: $( function() { var imgStack = []; $('.slideshow > img:gt(2)').remove().each(function() { imgStack.push($(this).attr("src")) }).removeAttr("src"); $('.slideshow').cycle({ fx: 'fade', before: function(curr, next, opts) { if (opts.addSlide) { if (opts.imgs.length) { var slide = new Image(); slide.src = opts.imgs.pop(); opts.addSlide(slide); } } }, imgs:
[jQuery] $('#id').width()
Hi, i'm having an issue with setting the width of a field using $ ('#field_id').width(). My setup is as follows: - I have a form with multiple divs, on load I run some code to turn these divs into tabbed content i.e. only one div showing at any point. When "&tab=x" appears in the URL, my code opens that tab instead of the default 1st tab - There is a field on the first (and default) tab which I'm a) reducing the width of and b) placing an image next to using the following: $('#field_id').width($('#field_id').width()
[jQuery] weird 404 records in website statistics on jquery js file
Hi, when I look at my website statistics (awstats), somehow I keep finding these 404 records that point to: /jquery-1.2.3.pack.js/eval/3DYR8yd%2Bmb25QTy058Fe3Q%3D%3D or /jquery-1.2.3.pack.js/ +sfgRmluamFuX1R5cGU9amF2YV9zY3JpcHQmRmluamFuX0xhbmc9dGV4dC9qYXZhc2NyaXB0+ Does anyone have an idea what this means?
Ajax returns & instead of &, Any ideas?
First off Hello to the community, first time posting here I've used the jQuery ajax code to return some HTML for a page. The HTML contains links with query strings on them, ?key=value&key=value etc etc However when the html is returned to the page the link href becomes ?key=value&key=value Now as far as clicking, this isn't an issue, but the links href is used for a lightbox plugin, which doesn't work if there is an & only if its &. Just wondered if any one could help. jQuery code: $.fn.loadTools
[jQuery] Instant animations (Superfish)
I'm using the Superfish plugin and which only allows the switching of submenus with .animate. Anyone know a options configuration that makes and instant "animation" (behaves like .show)? 1ms speed isn't fast enough either.
[jQuery] validate - only show certain messages
I am using the validate plugin. It is very cool and very handy. I want to only show the label message error for my email and not show them for any other inputs. Can someone help me with this? Thanks Mike
[jQuery] plug-in questions
I am a bit confused with all the possibilities! I am looking for cross- browser plug-ins for > tabbing > vertical accodion > flexible pop-ups (thickbox, lightbox, facebox,...) which you also can use for forms or a gallery. > pull-down menu that can display sub-folders and offers the option of cross-marking (like the google menus under their calendar section). that are preferably light-weights and solid! any suggestion or experience is welcome! thank you!!
[jQuery] How to bind validation to new loaded form?
Hi all, i have tried to transform a bind example to my situation, but i can't get it working. Via my menu, i load a form which i want to validate. ( with Validation plugin from http://bassistance.de/jquery-plugins/jquery-plugin-validation/ Loading the form into my content div works fine, validation fails. maybe someone can give me a hint how to solve this? thanks in advance.... See my (small) code below: loaded javascript: <!-- jQuery en plugins --> <script src="JS/jquery-1.2.6.min.js" type="text/javascript"></script>
[jQuery] Creating a mini menu attached to thumbnail
I am trying to create a small menu arrow that will appear next to an image when moused over. The Menu arrow should go away when the user mouses out of the image, except if the user mouses into the arrow istelf, in which case it will display some ajax content. function postMenus(){ $(".image_thumb").hoverIntent( function(){ var menu_loc = $(this).offset({ scroll: false}); menu_loc['left'] += $(this).width(); menu_loc['top'] += $(this).height() - 20;
[jQuery] formatting splitting the response from the server using jquery syntax
Hi There, I'm getting a response back from a .net page. The response looks like this and is variable in length. What is the best way to handle this on the client using jquery syntax? Sean {"first": "slideshow/52/2.jpg","second": "slideshow/52/2_2.jpg"}
[jQuery] remove objects from set
Hi, I add elements to set this way: jQuery.fn.pushIf = function(selector_or_nodes) { var nodes = (typeof a == 'string') ? $(selector_or_nodes) : selector_or_nodes; var node_count = nodes.length; for(var i = 0; i < node_count; i++) { var exists = false; for (var j = 0; j < this.length; j++) { if (this[j] == nodes[ i ]) {
[jQuery] dynamic tree / treeview
Hi I am using jquery to create tree structure type of functionality dynamically. I have to add nodes by opening dialog and save it into the database. Once response is returned then I need to show it on the page. I have few doubts here: 1) Once node is inserted into the database and response is rendered on the page then how can I fetch id/value of the node. Here, DOM shouldn't be updated automatically? I am not able to fetch parent node id while adding child into it. 2) Once data is rendered on the
[jQuery] :nthchild, :eq help
Basic Issue: Can you use a variable in place of the index in functions like :nthchild() and :eq() and if so, how? Detailed description: I'm new to jquery and am trying to create an image viewer. I've marked it up and used jquery so that when you click on a thumbnail image, jquery returns the order of the thumbnail (1,2,3..) as a variable. I was hoping that I could use this variable as the parameter for :nthchild to select the corrisponding image from a list of images (1,2,3...). The goal is to be
[jQuery] Instantiating multiple plugin instances on the same page
Is there a way of instantiating multiple instances of a plugin on the same page? What I have essentially is an animated effects plugin, and I want to be able to invoke separate instantiations of it, doing something like the following: <script> $( '#effect_1' ).animEffect( { name: 'jumper', color: 'ff0000', fps: 30 } ); $( '#effect_2' ).animEffect( { name: 'round-the-moon', color: 'ffff00', fps: 40 } ); </script> <div id='effect_1'></div> <div id='effect_2'></div> I'm still fairly new to javascript.
[jQuery] Validate and Ajax. Could someone, please, help me?
Hello, On a form I am remote validation for an email. However, to this validation, I also need to provide the inserted username which is on another text box. I am using the following: $().ajaxSend(function(event, XMLHttpRequest, ajaxOptions) { ajaxOptions.data.username = $("#Username").val(); }); I get an error on Firebug saying: ajaxOptions.data is null (?)()()Account.js (line 30) handle()()JQuery%2...1.2.6).js (line 2093) (?)()()JQuery%2...1.2.6).js (line 1875) trigger()()JQuery%2...1.2.6).js (line
[jQuery] POST METHOD IN REMOTE PARAM FOR VALIDATE PLUGIN
The jQuery Validate libraries "remote" parameter uses GET method for AJAX calls. If nothing is given as the "type" parameter in $.ajax() method, GET is taken by default. But working with PHP with some famous framework like codeigniter which normally don't work with GET method in URL makes it difficult to use the remote parameter. So in the Validate plugin, it should be specified type : "POST" in the following method around line 878 of jquery.validate.js (1.4). remote: function(value, element,
[jQuery] [validate] Sending Two Inputs Together to Remote Validation?
Is it possible to send two of the inputs in a form together to a remote validation php script? For example, I would like to check whether a person called 'Bob' has the email address 'bob@example.com'. The php script would need pieces of information from both the name input and the email address input. How could I do this? Thanks in advance, George
[jQuery] Pulling images dynamically from a folder.
Here is the page I am working on, I am relatively new to jquery and javascript in general. http://johntbrown.com/sandbox/lopano/work.html What I would like to do is to pull images dynamically from a folder to generate the back ground for the page. Then for the forward/backward buttons I would like to be able to scan through the folder, also I would like to have some sort of tool tip showing a preview of the next image when you put your cursor over the forward/backward buttons. -- View this message
breaking the .each loop
I have this code for loop breaking in table rows rows = $('#tableid .trclick').nextAll().each( function() { if($(this).hasClass("sub1")) { //do something } else { break; } This code does not break and give error. Does anybody know why or anyone has alternate solution?
[jQuery] jqmodal and ui datepicker problem
Hi I have a problem with jqmodal and ui datepicker. Often datepicker just doesn't appear when I initiate in in a jqmodal window. Funnywise there isn't any warning or error in firebug. than I have to clean cache in Firefox and datepicker appears again during next load of modal window - even it appears slow and somehow crankier than without modal windows. I tried many things and spent quite some time on it, but I doesn't get stable. Any ideas... my code:. //jqmodal $('#mw1').jqm({ajax: 'offer.cfm?at=1&oid=#myOfferID#',
[jQuery] validate - error in IE6
I am trying to run my page with the Validator code but on loading it in IE6 I get the "Expected ;" error followed by "Object doesn't support this property or method" errors. It has absolutely no problems in Firefox3. Strangely enough when I comment out the <META http- equiv="Content-Type" content="text/html; charset=UTF-8"> line the "Expected ;" error disappears although the validation still does not work. Here's my page: ----------------------------------------------------- <!DOCTYPE html PUBLIC
[jQuery] The last script on ready function
Hi all! Please, I'm in the need to run a script at the very end of a page loading. Actually my page runs several script in $(document).ready function, so I know that these are queued to run one after the others when the page is loaded. But I must run a single script as the last of all, how can I do a such things? Thanks in advance Marcello
[jQuery] find table rows that contains text
Hi, I am trying to get a reference to a table row that contains an exact match of a text. But I am getting more than one row. can you please help me? Following is the html table structure and the jquery script. -- html <table> <tr> <td><a>063</a></td> </tr> <tr> <td><a>63</a></td> </tr> </table> -- script var rows = $('table tr:contains(' + "'" + '63' + "'" + ')'); as you can see, both the rows contain text 63. But I want to get the reference to second row since that contains the exact match. How
[jQuery] scope inside callback?
Could someone help me figure out how to load the total number returned in the post request into the total variable of the object? Currently, the value of this.total remains zero through the script even though the post returns 12. $(document).ready(function() { function ajax_page(statsendpoint) { this.total = 0; this.updtotal = function(response){ this.total=response.totalnum; } this.load_pagination = function() { $.post(this.statsendpoint,{ rev_usr_user_id_reviewed:
[jQuery] pixelperfect
http://www.parkerfox.co.uk/labs/pixelperfect/ Is a bookmarklet that will allow you to drag elements around any page and informs you of the new coordinates. Uses jQuery and jQueryUI
[jQuery] clicking at bottom of long list moves entire page up.
Greetings! I'm developing a list of events, and when someone clicks on the name of an event, I want the details to be grabbed from a php page, and shown underneath. The HTML is this: <div class='eventName' eid='[the id for the event]'> [name of the event] </div> <div class='eventDesc' eid='[event id]'></div> My jQuery is like this: $(".eventName").click(function() { var eventID = $(this).attr("eid"); $.get("eventinfo.php",{eid:eventID }, function(data) { $(".eventDesc[eid='"+eventID+"']").html(data);
Next Page