[jQuery] how to access dynamic data?
hello groupies 1 ) how do i access ajax generated data? i have a select box populating via another select. like this: $("select#parent").change(function(){ var path='json.provider.php'; var options = ''; $.getJSON(path, { con:'getdata', val:$(this).val() }, function(jsondata){ $.each(jsondata.data,function(i){ options += '<option value="'+ jsondata.data[i].id+ '">'+ jsondata.data[i].name+ '</option>'; }); $('#child').html(options); }); }); this code populates my #child select element which is a simple
[jQuery] Var in the Succes: part of Ajax
Hi everyone ! My problem is simple. Here is my code : function ajax_test(){ anc_pv = $('.pv_act').attr("pv"); $.ajax({ type: "GET", url: "ajax_test.php", data: "", dataType: "html", success: function(data){ alert(anc_pv); // But it show "undefinided" } }); }; Any idea, someone ? Thanks in advance ! Bye !
UI Slider - IE6 Disappear
I'm using jQuery's UI slider plug in and there are a few problems in ie6. I can click on the slider handle and move it around, but when I release the mouse button, the slider handle disappears. When I press the mouse button again, the handle reappears until I release the mouse button. Anyone had a problem like the before? Any ideas on how to solve it? Thanks for any help you can provide, Joe
[jQuery] Variable Scope Help
Hello All, I'm running into some issues where I'm alittle confused about the scope of my variables. I have this code: $(function(){ var categoryID; //Aloha Item Category Dropdown Selection //Takes the Selected Value and adds it to Item Search Ending $("#add-item select[name='CategoryId']").change(function(){ categoryID = $("#add-item select[name='CategoryId'] :selected").val (); return categoryID; }); //Item Search for food name $("#add-item #ITEMNAME").autocomplete("<?=
[jQuery] (validate) How to have an error message per rule when using error labels
Hi, I'm using jquery 1.3.2 and jquery.validate.js 1.5.5. I read through the docs, and did a quick search on this list, but didn't find what I was looking for. I want to have an error message for each rule on a field when using error labels in the markup. As far as I know, this can currently be done only with the "messages" option to validate(). I have something like this (hope the markup is preserved...): <script> $("form").validate({ errorContainer: '#errorContainer', errorLabelContainer: '#errorContainer
[jQuery] jQuery .append various elements of a class
Hi guys I'm trying to do the following: ----------------------------------------- $(document).ready(function(){ img=$(".img"); imga=img.attr("href"); $("#imgbox").append("<img src='"+imga+"'/
Make Dtree dynamic with jquery
I have this code [code] <html> <head> <link rel="StyleSheet" href="dtree/dtree.css" type="text/css" /> <script type="text/javascript" src="dtree/vertdtree.js"></script> <script type="text/javascript"> function addElement() { var mytree = document.getElementById("mytree"); mytree.add(158, 150, 'testteam_index.asp?groupe_id=154', 'Zend Studio', '', ''); document.write(mytree); //refresh werkt ook niet omdat object leeg is } </script> </head> <body> <h1>Horizontal Tree Example</h1> <br> <script language=javascript>
[jQuery] [validate] Appear just one error per time
Hello, the subject describes perfectly what I need. I have more than one error but I need to display one error (label) per time.. E.x.: Name (is empty) Age (is empty) - When submit it happens: Name (appears a label: Error Name Empty) Age (appears a label: Error Age Empty) - And I need this: Name (appears a label: Error Name Empty) Age (is empty, but here don't appear the error while the Error Name Empty is not solved) I hope that I've been clear with my question.. Thank's At All
[jQuery] Click event not working?
I'm trying to execute a function "animate_next()" when a "div" element is clicked, but it isn't working. Here is what it looks like.. $('#playground').click(function(){animate_next();}); If I put.. $('#playground').ready(function(){animate_next();}); ..then it will work fine. Here is the "div" element on the page.. <div id="playground" style="width: 800px; height: 600px; background: #666666">
[jQuery] [name=<any>] selector behaviour in IE6
I just ran into a behaviour that I can't explain using jQuery 1.3.2. -- HTML <table id="global_id"> <tr>...</tr> <tr class="rel_event" name="12345">...</tr> <tr class="rel_event" name="12347">...</tr> <tr>...</tr> </table> -- First code which doesn't work in IE6 (work in mozilla browsers, IE7+, Opera and probably others as well) $('#'+gl_my_tbl_id+' tr.rel_event[name='+uniq_id+']').remove(); -- Code that DOES work in IE6 $('#'+gl_my_tbl_id+' tr.rel_event').filter('[name='+uniq_id+']').remove ();
[jQuery] Validate: Position of error messages using xVal and jquery with the validate plugin
I have an MVC application that is using xVal and jquery with the validate plugin. I am trying to get the error message span's that appear to display under the associated form elements., right now they display to the right. I noticed that this seems to be possible with jquery validate since i see it in the demo located at http://jquery.bassistance.de/validate/demo/index.html If someone has done this before could you please give me some guidance. Thanks in advance. R
[jQuery] Toggle refresh issue on IE7
I am seeing a weird effect on IE 7. I have a set of vertically aligned/stacked boxes (simple divs) that each contains a link that toggles the contents (small images loaded via ajax) of the box. Everything work as expected on FF - click on any links and the contents of the box toggles. Very similar to an accordion. On IE, the toggle works - BUT the boxes are not being pushed down. Instead - it is floated above the box that was just toggled. However, if I move my mouse around - over the boxes - they
[jQuery] json to array?
Hi. I'm trying to use this google api for an org chart and I'm a little lost. <script type='text/javascript' src='http://www.google.com/jsapi'></ script> <script type='text/javascript'> google.load('visualization', '1', {packages:['orgchart']}); google.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Name'); data.addColumn('string', 'Manager'); data.addColumn('string', 'ToolTip'); data.addRows([ [{v:'Mike', f:'Mike<div
[jQuery] Ajax Form Plugin not posting variables in IE7/8--Empty $_POST array, but works in all other browsers
Hello, I've created an extremely simple price calculator form using the form plugin (http://malsup.com/jquery/form/), that sends some dimensions to a php script, which then reports the correct price back after some calculations into a div using ajaxForm. This is working in FF, Chrome, and Safari perfectly, but in IE 7/8, the form variables are not being posted for some reason--the server-side script executes, but the $_POST array is empty. If I turn off javascript in IE, the form submits the usual
[jQuery] innerWidth doesn't count scrollbars in Safari/Chrome
Hi, Does anyone knows a method to measure the scrollbar's width, which works in Safari/Chrome. The innerWidth function doesn't seem to take the scrollbar's width into account when measuring the innerWidth of the child element of a scrollbared element. Thanks!
[jQuery] Upgrading to 1.3.2 from 1.2.6, selectors that used to return many elements now only returning first
I am not trying to upgrade to 1.3.2 and in every case I use a selector that should (used to) return many elements now only returns the first. I checked using the .size() method and it is indeed only returning 1. Any ideas on what went wrong? Thanks, Eric
[jQuery] Sending data to the server
Is there a way in jQuery to send data to a server as something other than a command string? It would be very convenient, for example, to send a block of xml or json much like getJSON() in reverse. It would need to be sent over a secure https connection. TIA!
[jQuery] focus() killed by return false;
I have an anchor tag that, when clicked, reveals a login form. I'd like the first field in the form to have focus when its revealed, and I can see that it does as it's being revealed in the slide animation but then focus is lost after return false; any ideas? Here is my code.... I'm new to jQuery, so any help is appreciated $(function() { $("#login a").click(function() { $("#login").animate( { width: 300, height: 20 }, 500); $("#login a").hide("slide", null, 500, loginCallback);
clear content before parsing
Hi everyone, I have a function that parses xml data to a <ul>. What I need to know is how to clear the <ul> before parsing a second time to refresh the list. my current script looks like this: $(document).ready(function() { $.ajax({ type: "GET", url: "myData.xml", dataType: "xml", success: function(xml) { $(xml).find('trick').each(function(){ var title = $(this).attr('title') var description = $(this).find('description').text() $('<li></li>').html(title + ' (' + description + ')').appendTo('#help_download
jQuery overriding the link function on certain browsers
[size=18]Hi everyone, I'm relatively new to jQuery and have a problem with an expandable menu I have created for a new Wordpress theme. With my expandable menu I am simply (slide)toggling the children <ul> by clicking the parent <li>. This should work fine but jQuery is overiding the default event for the anchors in the children resulting in me having a nice expandable menu that animates well but with its links disabled. As far as I can tell this should work as I am targeting one level of anchor
[jQuery] Cycle plugin: problem showing slide titles in pager (using pagerAnchorBuilder function)
Hi This question has been asked several times in various places online, but the solution that's usually given isn't working for me. I want to show the slide titles (rather than just numbers) in the pager, so am calling it like this: jQuery(document).ready(function() { jQuery('#cycle-pics').cycle({ speed:1000, timeout:3000, next:'#next', prev:'#prev', pager:'#cycle-numbers', pagerAnchorBuilder: function(idx, slide) { return '<a href="#">'+(idx+1)+'
[jQuery] LavaLamp SubMenu Help!
<span class="Apple-style-span" style="font-family: Verdana; font-size: 12px; ">Hi I would like someone to help me out with some issues I am having with the Lava Lamp / SubMenu. This is what I have achieved so far <a href="http://karen.2kmegs.com%2C/" target="_blank" style="color: rgb(50, 50, 50); ">http://karen.2kmegs.com,</a> however what I am trying to do now is that when I am hovering the 'Home' (or whichever has a submenu) I would like the text to remain Green, because as it is now, once I
display alert message in div only once?
I have a classified listing application (php) that shows an alert message on the main page to let the user know if there was an error, if the listing was entered, if a required field was left blank, etc. the simple jquery code is: $('#alert').fadeIn("slow"); setTimeout(function() { $("#alert").fadeOut(3000); }, 4000); the alert msg. displays whenever the page is loaded. However, if someone navigates with the forward or back buttons in the browser, or reloads the page, the alert
Multiple Gallery cross linking problem.
I've run into this problem where the galleries are cross linking. You can check this out by clicking the first item in 'selected works' and using that gallery, then closing it and clicking the next gallery (nothing happens), but now go back to the first gallery, its changed. *Not all content is in place for the sake of trying to get the skeleton of the site working before content is fed in. Any ideas here? I would like to have this style of gallery and not some other solution unless it is close.
[jQuery] Any documentation for element.nodeIndex?
Hello, I was editing some javascript code yesterday that happened to use jquery. Part of the code selected two elements via jquery. Then the original author used nodeIndex to determine the position of each of these nodes in their parents. I could not find any documentation on nodeIndex on the jQuery site or anywhere else on the internet. It seemed to work in IE8, but I did not see the property from FireBug in FireFox 3.5. So I removed the call to nodeIndex and used a for loop to calculate my own
[jQuery] ajaxForm - how to give a failure message
Hi there, I'm trying to make a form that has both browser and server side validation. I'm using the validate plugin for browser side and thats working fine. I'm using the form plugin for server side. I'm using ajaxForm to test if the form was submitted and then display a thankyou message. My question is how do I display an error message if the form did not validatae server side? Here's my code so far: $("#myForm").validate({ success: "valid", submitHandler: function(form) { // bind 'myForm' and
[jQuery] jQuery .append all elements
Hi guys I'm trying to do the following: ----------------------------------------- $(document).ready(function(){ img=$(".img"); imga=img.attr("href"); $("#imgbox").append("<img src='"+imga+"'/
help with auto scrolling...
how come this doesnt work? I got it from learningjquery.com Javascript $(document).ready(function() { $('#scrollit').click(function() { var divOffset = $('#scrollable').offset().top; var pOffset = $('#scrollable p:eq(2)').offset().top; var pScroll = pOffset - divOffset; //alert(divOffset +" " + pOffset + " " + pScroll); $('#scrollable').animate({scrollTop: pScroll}, 1000, 'easeOutBounce'); //$('#scrollable').animate({opacity: 0 }, 2000); }); }); HTML <div id="scrollable"
[jQuery] (Validation) How to use with Multi-Select?
I have a form with a multi-select field that needs to be validated, so at least one option is selected. Is there a setting I'm missing in the validation plug-in? Thanks in advance.
[jQuery] (Validate) - Show one error at a time
Can anyone point me in the right direction or an example to show only one error at a time at the bottom of the form? Something similar to this: https://www.imeem.com/signup/
[jQuery] validate - Any example similar to imeem.com?
I can't seem to figure out how to show only one error at a time similar to https://www.imeem.com/signup/ Anyone have an example I can take a look at? Or point me in the right direction?
Jquery Navigation
Hi i was wondering if any of you would be able to point me in the right direction or help me get started. I am just learning javascript and jquery and I am looking to do a user interface system using key commands ill try and explain. Using the up down left and right i wish to have a menu on a web page with a vertical carousel but the text gets enlarged the closer it gets to the main area for example Current Selection would be 78px Selection underneath would be 56px and so on.. I was wondering if
JQuery Lava Lamp SubMenu Help!
Hi I would like someone to help me out with some issues I am having with the Lava Lamp / SubMenu. This is what I have achieved so far http://karen.2kmegs.com, however what I am trying to do now is that when I am hovering the 'Home' (or whichever has a submenu) I would like the text to remain Green, because as it is now, once I go on the submenu, it turns white again Also, is there like a way to fade the colour transitionally from like 'Home' to 'HTML' rather than change it at once, so that once the
EasySlider - List order
I apologize in advance as I am a total JQuery noob! I have integrated the EasySlider code with a php list generator. Basically people submit an image to the site which is then presented within a list and that list is then used within this Jquery script. Currently the list is displayed in order of submission... so oldest first newest last. I require this to be the other way around... so Newest first Oldest last. The JQuery code is below, any help would be very much appreciated. (function($) { $.fn.easySlider
Textboxes in asp:repeater with total row
I have a asp:repeater which repeats 2 columns of textboxes inside a table. I also have totals textboxs underneath the repeater (not in the footer of the repeater). When the user leaves a textbox (onblur), I want to set the total for that column to the sum of the textboxes in the textboxes column. I add a blur event to all textboxes in the tables tds. In the blur event, I attempt to get the inputs from the same column as the current textbox. However the blur event works on tb1 only. I am also unsure
IE problem with XML
Can someone please help me with this issue? I am using xml served from a php script to load markers onto my google map. It work beautifully in Firefox but the code fails on IE : function initialize_all_venues() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(51.50002, -0.12618), 12); map.setUIToDefault(); } $.get("sites/all/themes/zen/zen/template_ajax.php",{},function(xml){ // Run the function for each venue tag
Looking for some kind of timeout/countdown
I am looking for a timeout/countdown(dotn know the right name of it), i have a site where i have a couple images that are divided in different categories(web, print, logo) if i click on the web button al of the non web images fade(opacity), i dont want to use and reset btn thats why i am looking for a timer. when the time is up all of the images fade back. Example code(very basic) $('#hi-ind').click(function(){ $('.hi-logo').fadeTo("slow", 0.10); $('.hi-web').fadeTo("slow",
Effects Bounce Issue. - .stop()?
Hi all. I am trying to stop this script from continually running whilst to mouse is over the link. I have tried using '.stop()', but to no avail. Perhaps i'm putting in the wrong place? I would like the script to run just the once whilst the mouse is over the link. Also, is their a way to stop the script 'cuing', if the mouse were to pass over the link a few times? Can anyone offer advice on this? All input will be greatly received. Many thanks, Bil <script src="http://jqueryui.com/latest/ui/effects.core.js"></script>
How to change an running animation without stop
Hey forum members, first, I apologize for my bad english. I hope someone can help me. So, like discriped in the title I want to change an running animation. For example: Everytime I click on a button, a div should animate 50px to the right in 1000ms. When I click on the button during the animation is running, the animation should go to 100px in 2000ms, without stop. I don't know if its possible, someone knows the answer. I made a little demo with the stop function: DEMO I hope you can understand
[jQuery] [jQuery Time Entry] Range
Hi all, I'm new to jQuery. I'm not sure this is the right place for question about plugins. I'm trying the Time Entry Plugin with a Time range. Some one know how I can update the #tTo field when I increment the #tFrom field? Thanks for help. Mirco
Next Page