HTML expression throwing an exception in latest version of jQuery, but not in earlier one
The expression in red works fine in jQuery 1.2.6 but does not in 1.4.2. Can someone assist? jQuery("#menu_sample > li > a[@class=expanded]").find("+ ul").slideToggle("medium"); All the child li items for the following HTML should display: < li><a class="expanded" href="#">Weather</a><ul> (li items here) Screenshot of exception attached. Update: the following jQuery code solved the problem: jQuery("#menu_sample > li > a").filter('[class=expanded]').find("+ ul").slideToggle("medium"); Did
Not sure why this function won't work
Hi, I want to build a mortgage calculator but when I click the calculate button nothing happens. I hope you can see what I've done wrong. I've had to use inline styles because the CSS window in the Template Design page in Goolge Blogspot only works on the main page. My code: I'm using jQuery <script src="http://code.jquery.com/jquery-1.4.2.min.js" type="text/javascript"> </script></script> This is my background to the calculator <div id="Calc" style="background-color: khaki; border-bottom:
.mousedown / .mouseup issue
Hey all, I'm trying to simulate a button click on all links by adding a 1px margin to all links when there's a mousedown and taking it away when there's a mouseup. The issue is that when I click on one link, all the links on the page are shifting rather than the one that I click on. If I use the same exact code but add "color", "red" instead of "marginTop", "1px", it works perfectly fine. Am I doing something wrong? Is this a total id10t issue on my part? --nks $("a") .mousedown(function() { $(this).css("marginTop","1px");
using a selector that was loaded by .html
I am trying to load html into a div with jquery and then target a selector within the loaded html. It's not working! Here is what I have. I am new to jquery so it's probably something easy. I am loading this into a div with the id "questions" $('#questions').html('<strong>What kind of website do you need? </strong><br /><br><input type="radio" name="type" id="radio" value="informational">Informational<br><input type="radio" name="type" id="radio2" value="ecommerce">eCommerce<br><input type="radio"
How to check whether all radio buttons have been been selected
Hi, First post...here goes. I have a form that will dynamically place a number of radio button groups on the page. I don't want the user to be able to submit the form until a value has been chosen for ALL fields. I have hidden the submit button with the though of showing it again once ALL fields have been checked. My code so far... $(document).ready(function () { //Hide the submit button $('#MainContent_sbmtButton').hide(); //Change background of question
modify href adding a final text on click [SOLVED]
$("a.approfondimento").click(function () { });I need to add ?format=bbbb at the end of my href with .approfondimento with class example: <a href="content/asd">aaaa</a> onclick: <a href="content/asd?format=bbbb">aaaa</a> how i can make this? thx
.hover functions not firing correctly when rolled over too quickly
I'm a jQuery nub, so I don't want to call this issue a bug, because I'm sure there is a solution I don't understand quite yet. I am building a sliding menu with .hover() and I have a series of three functions within handlerIn() and three within handlerOut(). If you quickly run your mouse over and then off of the hover area, without letting the animate() function complete, the handlerOut() functions don't fire correctly. Here's the page: http://www.sandiegopcsupport.com/cindi/joey/index.php And here's
Jquery effects on images
Hi am creating one e commerce site.And when i click on the image in the product i want the this kind of effect like in this site.[http://www.mightyleaf.com/indian-tea/organic-darjeeling-estate-black-tea/][1].In this page for example if i click on the product pop up window comes up with large image of the product and the other related image of the product(on the top right corner).Please see the effect by clicking the product image [1]: http://www.mightyleaf.com/indian-tea/organic-darjeeling-estate-black-tea/
live change event handler on select element does not work
Although not (completely) new to jquery I am new to posting on this forum. I came across a problem with attaching an event handler to a select element using the live() method and reported it as a bug, see http://dev.jquery.com/ticket/6702. But, perhaps I should have posted here first to have others see if they can replicate the issue or tell me what I am doing wrong. A very simple sample demonstrates the problem, see below. If a click handler is attached to an anchor element using live() *prior
A form is not submited when $(.submit).click(); used
Hi, I have some function to fire when I click a submit button. When I do that a form does not submit anything, it just fire my function etc. Here is my code: $("#hm-submit-form").click(function () { $("#nav ul li.products").delay(200).fadeIn(); $("#nav ul li.agel-tour").delay(600).fadeIn(); $("#nav ul li.compensation").delay(1000).fadeIn(); $("#thanks-box").delay(200).fadeIn(); $("#thanks-box").delay(1500).fadeOut(); $('#target').submit(); //this
ajax limit
Im using ajax and getscript alot in my website. I load my page in multiple part and i have navigation bar that use ajax to refresh the content. It works perfectly in Firefox, in IE8, it stop working after i click 13 time on my navigation bar... doesn't matter wich or if i on 2 different click 6 on one and 7 on the other... after a total of 13 request it stop working.... I know 13 is not a lucky number but there must but some explanation... this work in firefox, i can't see any problem in firebug.
Picking the Order of Images in a Component (Div) (Drag-and-Drop jQuery)
Camarades, I have a problem. I have a div component where I'll drag multiple images. This part is working perfectly. But I am not able to read the order of these images played in the component. What happens, I can play any position in the image of the div component, however, like to read in order as they are, from left to right. I believe it is possible, but the solution must be complicated. Some of his friends could help me in the routine javascript to read this? Or know any technique that can help
Problem with show() and hide() in IE8
this code doesnt seem to work in IE 8, but works great in ie7 FF, chrome, safari. Is this a known bug? $("td.dontShow").css("display","none"); $("#clients_scroll_left").click(function(){ $("td.dontShow").hide(300); }); $("#clients_scroll_right").click(function(){ $("td.dontShow").show(300); }); <table> <tr> <td>content</td> <td>content</td> <td class="dontShow">content</td> </tr> </table>nothing happens when i click once #clients_scroll_right, but when i click #clients_scroll_left
Removing an option from a select based on the option value
I'm using the following code to remove an option from a select control based on a selection in a different select control and the option text in the select option that is being removed. The code works as I want it to, but I would prefer to use the option value for identifying the option to remove instead of using the option text. I've tried several different ways to do this, but can not find the proper syntax. Here is the sample code: <html> <head> <script language="javascript" type="text/javascript"
Inconsistent event behavior in webkit browsers.
I have been spending my whole life on converting a flash version of a header/menu system to jQuery HTML. It is very nearly done in that it works nearly 100% perfectly in Firefox and IE8. http://clifgriffin.com/blockade Unfortunately, in Chrome and Safari, my menu events of the top menu seem to fire inconsistently, and in the wrong order. It is easy to trigger a problem by simply circling your mouse over the top links. Pretty quickly, one of the menus will retract when it's already retracted, or
How do I generate a dynamically sized grid for drag and drop?
I've never worked with Ajax before but I've been reading up on it and done some basic tutorials and am comfortable with the concept of asynchronous communication and how everything works from a technical communication perspective. That being said I have no idea where to start on this project which seems like it should be fairly simple. 1. the browser will have a "working area" which is a rectangle of some decent size, there will be a toolbar of objects on the left hand side. This work area should
Check attribute is present
How to check if an attribute is present in an HTML tag ? Suppose if i have a label tag for e.g. <label class="fieldLbl" data-company="abc"></label> "data-company" is my custom attribute as defined in HTML 5. So how do I check if the label under consideration has attribute called "data-company" ?
$.get() can't load from chrome:// URIs (CORS restriction)
$.get("chrome://myext/content/snippet.html", function(data) { alert(data); }); Error[Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location: "chrome://myext/content/jquery-1.3.2.min.js Line: 19"] @ chrome://myext/content/snippet.html Is there anyway I can get jQuery to load chrome:// resources (ie. files within my FireFox extension)
slideToggle() method (jquery 1.4.2) and Prototype (Array length must be assigned a finite positive number)
I hope someone can shed some on light on the following issue. I have a page which includes the Prototype library. Also on this page is a collapsible menu, which comes from http://www.lousyllama.com/sandbox/collapsible-menu. The first menu at left is in use. I had to modify the original jQuery code to get the collapsible menu to work on jQuery 1.4.2. Problem: An exception is being thrown (by the jQuery framework?): Line: 464 Error: Array length must be assigned a finite positive number
Possible to simulate a mouse rollover for specific amount of time?
I am curious if it is possible to use jQuery to simulate a rollover event after a page has loaded entirely. Essentially, if you had a navigation menu with dropdown lists, could you make the lists drop down in order, one after another, each for 5 seconds, after the page has finished loading entirely? Thanks
problem with animate an scroll
hi @ll i wanna place a picture on a fixed position under a vertical menu and the menu can expand. and in the bottom i have a frame. when page load, the position should be calculated with the right margin and when the user scroll the image have to stop bevor it reach the frame of the bottom. and that is the problem. when i scrol slowely, it works, but when i scroll fast, the picture moves over the frame and that shoudn't be. i think it's cause when the scroll event is called again and its still in
Adding "validator.addMethod", but dosn't work, any help guys
Hi Jquery Guros, I develop register form (in arabic). I added "validator.addMethod" to check the firstname text.I want to check that the "firstname" text must be in INGLISH leter and Numbers(means, user can't insert arabic leters or anything else). I added the script: ///////// chack firstname (English leter OR numbers <b>$.validator.addMethod("firstname",function(value,element){ return this.optional(element) || /^[a-zA-Z0-9._-]{3,16}$/i.test(value); },"Username are 3-15 characters");</b> You can
Sliding a DIV and swapping images/text at the end of slide
I am trying to create a menu that would look and act like this image illustrates: http://www.sandiegopcsupport.com/cindi/joey.html Essentially the three boxes slide down when rolled over and menu items appear in the portion that has slid down. So far, I have figured out how to make an image slide using jQuery: http://www.sandiegopcsupport.com/cindi/joey/index.php I have been doing a ton of research trying to figure this out and can't. Can anyone explain to me how this is done, or link me to an example?
How to add a class to a element depending on the anchor of the page ?
Ohai, First, my url looks like this : http://site.com/#a1111 I would like, depending on the value of the anchor called, to add a class to the box related. Actually, i have : <div id="a1111">text</div> <div id="a2222">text</div> <div id="a3333">text</div> And i would like that when the page is called like in the previous example, the "highlight" class is added to the box with the id "a1111": <div id="a1111" class="highlight">text</div> <div id="a2222">text</div> <div id="a3333">text</div> Would you
Use Ajax and Php to generate and run a javascript
The idea is that a php file generates a javascrip code when it is called via Ajax. Is this possible? Of course I also need to make sure the loaded script is run. Any suggestions? Thanks. e.g. $.ajax({ type: "GET", url: "test.php", data: "country=USA", dataType: "script", success: function(){ alert( typeof data ); } }); test.php echo "<script type=\"text/javascript\">"; echo "data = \"".$_GET['country']."\""; echo "</script>";
Enable button when checkbox and radio button is checked
i know how to enable the button when one or the other is selected, how do i check if both are selected?
$.load on form pages - can't get query data in processing script
Hi all - I am a newcomer to jQuery and am finding it incredibly useful, but have hit a bit of a challenge... I have a database site I am currently designing, and would like to use a single page with forms in external html documents to undertake admin tasks (eg. add/remove records etc.) I have managed to successfully load the form html into the necessary div using the $.load function, however, when I try to process the form, with this code: $("#add_form").validate({ debug: false,
help with check all and unselect all
Hello ..Can someone please help me out with this check all /uncheck all I'm trying to accomplish. I currently have this javascript function that handles check and uncheckall.. functionjqCheckAll(id, pID) { $("#" + pID + " :checkbox").attr('checked', $('#' + id).is(':checked')); } inputtype="checkbox" name="checkAllSH701" id="checkAllSH701" onclick="jqCheckAll( this.id, 'SH701_ChkBoxTBL' );"/> I'm having trouble handling unchecking the checkall checkbox if the user manually deselects one of the
easy function like substringBefore in Java ?
Does JQuery provide an easy function like substringBefore in Java ? My string pattern is "1000 aaa bbb ccc", it always starts with digits, I need to get these digits. In java, we just use substringBefore(str, " "); //before first empty space. Does JQuery have same function to handle this ? Thanks.
Strange behavior with serialize and object literals
hi! i'm having a strange issue. my code: GEvent.addListener(map, 'infowindowbeforeclose', function() { var form1 = $('#window_form_tab1').serialize(); var name = form1.name_field; alert(form1); //save(marker, $('#window_form_tab1').serialize()); }); and this is the form: ''+ '<div id=\'window_div1\' style=\'width: 300px; height: 300px; \'>'+ '
Problem with hover event with two elements
I have an html link that has uses hover() to trigger a div to slidedown (I animate top). This all works and looks perfectly, except that when the mouse moves off of the hyperlink and onto the div that contains the menu links, it immediately triggers the mouseleave event and the menu vanishes. Obviously, I felt kind of stupid after tweaking it endlessly before noticing this "bug". The problem is: I can't really figure out a way to achieve the effect I want. Here is a link to my work: http://clifgriffin.com/blockade
$.ajax or $.getscript limit
I have a weird bug, i use ajax and getscript to load a website in piece (using php and file_get_contents. I have a multiple navigation bar that refresh the contents with ajax and getscript, the problem is there seems to be a point where ie8 just stop executing jquery... like if i navigate 13 page in one navigation or 6 in one and 7 in another, then it stop just stop requesting any jquery.. its a weird bug and since it only happen after exactly 13 times and only in IE8 and it doesn't give any script
Easiest way to use clear link to hide html entities
Hi everyone, I have a large set of input fields (of checkboxes and radio buttons), and aside each set, is a clear button (just looks like text you can click on) that clears any input next to each of the input fields. When no input buttons are selected, the HTML entities that depend on them are supposed to disappear, and this works on load. My question is how does one easily incorporate that clear button so that it tells the listeners already in action to clear those entities when they click on clear,
Index number in 'global' context.
HTML: <table> <tr> <td><a href="#">a</a></td> </tr> <tr> <td><a href="#">b</a></td> </tr> <tr> <td><a href="#">c</a></td> </tr> <tr> <td><a href="#">d</a></td> </tr> <tr> <td><a href="#">e</a></td> </tr> </table> How to find index-number of 'a' - element. $('table tr td a').index() - always returns 0, but I need an index-number of link not in 'td'-element but in 'table'-element.
Trigger accordion based on scroll position
Hi There, I'm wondering if someone could point me in the right direction on this. I have an accordion set up which is all working fine. Clicking accordion elements scrolls a main div into position (y-axis). However, i would like to trigger the accordion externally. More specifically, if the user manually scrolls the main content div (using the browser scrollbar or their mousewheel) i would like to trigger the relative accordion section based on the scroll (y-axis) position of the scrolling div. What
Child selector in only one table
If I use an child selector like in http://api.jquery.com/nth-child-selector/ how can I prevent it from being applied to all tables? I need to select an child from only one table.
Hiding DIVs + keeping browser viewport static.
Hi all, I am new to JQuery and have been plodding along learning at a slow but steady rate. There is however one problem that I can not figure out how to solve (more than likely I can not find the appropriate terminology for it). I have attached a test version of the site below: http://www.kolodotschko-design.com/hosted/kdtest/ The top of each page expands each piece of paper out to view its contents. The problem comes when spread the first two pages down and then scroll down to open the third.
Load document to div (.load) and apply'ing scroll bars?
As the title says, I am using the .load function of jquery to load a php document into my DIV My div has scrollbars when im entering the url in browser, but when i fill in forms , press submit , and use the .load function to reload a php file in my div , the scroll bars dissapear. Code: $('#accounts_container').load('accounts.php'); Loads accounts.php into: accounts_container Then for my accounts_container div i use this: overflow:scroll; But when the page is fully loaded and i call this function
Inserting table rows - fails in IE
I am using what I thought was a fairly standard way to add table rows. Generated a string - and then $("#table1 tr:last").after(totalString) However, in IE7 this completely fails and in IE8 it appends to the top of the page. You can see this here: http://www.riaforge.org/index.cfm?event=page.search Any ideas?
Is there a way to auto scroll to a certain window position using jquery?
How to window scroll automatically to a certain position on page load using jquery?
Next Page