[jQuery] how to get action attribute from form
Hi, How do I get action attribute from the following form if I know id and name values. <form name="myForm" id="myForm" method="post" action="register.php" onsubmit="return false;"> I tried those and it did not work: $("form[name=myForm]").attr('action'); $("#myForm").attr('action');
[jQuery] history plugin
Hello, I was wondering if anyone has successfully combined jQuery ajax calls with a browser history plugin. I have seen lots of older posts, and lots of older libraries, but not many examples for a current, cross-browser solution. I have tried using Really Simple History (http://code.google.com/p/reallysimplehistory/), and while it does add the anchor pages to my history, the content remains the same when going forward / backward. I also tried the JSSM plugin (http:// trac.nathanhammond.com/jssm/),
[jQuery] [tooltip] Upgraded to jquery 1.3.1 Tooltips doesn't show up
Upgraded to jquery 1.3.1 Tooltips doesn't show up
[jQuery] Performance suggestion: Use object hash instead of regexp
(This is really directed at the jQuery core team) I notice that jQuery uses regexp statements like this one... (used in the position() and offsetParent() methods for example) .../^body|html$/i.test(offsetParent.tagName) Might it be faster to use a simple object hash like this instead...? var test = {BODY:true, HTML:true}; ...test[offsetParent.tagName]; I did some crude experiments and found that the hash technique was at least 4 times faster in IE7 and 15 times faster in FF3. I've dumped some more
Hiding parent div if child div is empty
I've just started looking into jquery and I'm already stuck. If anyone could help, it would be greatly appreciated! I have the structure: <div id="orgPostCode"><div id="orgPostCodeTxt">PostCode:</div><div id="orgPostCodeVal"></div></div> The value contained in orgPostCodeVal is dynamically generated from a database. Sometimes that value exists and sometime it doesn't. When there is no value in the orgPostCodeVal, I want to hide the parent div orgPostCode. Everything I have tried hasn't worked. Anyone
Width in % instead of px
This code: $(".selector").each(function (i) { var capacity = Math.round($(this).text().replace(/\,/,"")); $(this).width(capacity); }).fadeIn(2000); ..returns width in px, how can I modify it to use percentage? Thanks
[jQuery] Problem with Chrome firing events correctly
<div><div>I am having trouble getting this piece of code to work correctly in Chrome. It works just fine in in IE7, IE8, and FF. Watching the Chrome javascript console doesn't reveal anything useful.</div><div> </div> <div>I manually checked each value in the if statements, and they are all coming back true.</div><div> </div><div>The textbox is not created or changed using javascript so I shouldn't need to use .live. </div><div> </div><div> </div><div> </div><div>$('#textbox').bind('keyup focus blur',
[jQuery] about :not(:last)
Hi! Please, consider this code: $.fn.url2 = function(absoluta) { var slots = $(this).parents('dl:not(:last)').map(function() { return $(".Texto:first", $(this)).text(); }); var slots2 = $(this).parents('dl').map(function() { return $(".Texto:first", $(this)).text(); }); return slots.get().join("/") + ' -- ' + slots2.get().join("/"); }; The funny thing of this code is that slots and slots2 have the same items Could you point me why
[jQuery] Help creating a function
Hello, I have a site where i want to run a realtime check. I have 6 form fields, when someone fills a number in jquery has to check if he doesn't go over the max what he can fill in. So for example he kan take 40 bags: Field one he fills in 10 Field two he fills in 10 Field three he fills in 10 Field four he fills in 10 Field five he fills in 10 Field six he fills in 10 He wants to take 60 bags thats over the max he can take so there has to show a messages on the website: You can't take more then
[jQuery] Math.ceil rounds down instead of up!?
I've finished my shipping calculator script, but now for some reason Math.ceil used on "var sum" in my script does the opposite of what it's supposed to! When it's used in an older version of my script it works correctly so I would assume I've done something wrong that's borking the script now. This script correctly rounds up the totalweight to the next whole number: ------------------------------------------------------------------------------------------------ <html> <head> <script type="text/javascript"
[jQuery] jQuery Forms and jTabs
Hey guys... Im a total noob on the DOM world and just started trying to use JQuery. I intend to start learning this as soon as I can because my website will be able to benefit a lot from this amazing technology. Unfortunatelly I'm working in such ridiculous tight dead-lines that I dont have really enought time to understand it better and I'm simply following a bunch of tutorials, and seems like I'm not doing that right :S Could you guys help me out with a problem I've been having with use to jQuery.Forms
[jQuery] DatePicker not working--how to debug?
I'm struggling to figure out why DatePicker is not working for me. I'm including the following files (and they're all loading fine). Is there yet another file required? ui.core.css ui.theme.css ui.datepicker.css jquery-1.3.1.min.js jquery-ui-1.6rc5.min.js jquery-ui-datepicker-1.6rc5.min.js The form input looks like so: <input type="text" name="foobar" id="foo" class="DatePicker" /> The following has no effect at all (including errors): $(document).ready(function(){ $(".DatePicker").datepicker();
[jQuery] Cascade (chained) works in Firefox but not in IE
I am new to JQuery and your cascading dropdown was exactly what I was looking for. After formatting my data in JSON I have tested out the Chained example (http://dev.chayachronicles.com/jquery/cascade/ index.html) and it ONLY WORKS in Firefox and NOT IE. I am attempting to load the data from two external files, while your example loads the second data set from a static var. Is there a further step necessary to get this to work in IE? I have my working example at: http://jamestilberg.com/jquery/ Any
[jQuery] How to make Jquery work properly
I have only been recently introduced to using JQuery and I am having basic problems of making it work. I previously used Takashi's MudCorp's Image Gallery but it came into conflict with the simple JQuery slideshow gallery I am implementing. What I have in my wordpress post is this: <div id="section1" class="pics"> <img src="/wp-content/uploads/ccp_invitation_no3_uk.jpg" /> <img src="wp-content/uploads/arnsdorfss09_f.jpg" /> <img src="wp-content/uploads/ccp_invitation_no3_uk.jpg" /> </div> <a id="prev"
[jQuery] DIV position
Is there any way to set the z-index of the div? I have series of hidden DIVs (in each row of table and clicking any of those would pop-up a information guide) Here is my code: function showProfile(id) { $('#profile_' + id).show("slow", hideAllProfile (id)); } function hideAllProfile(id) { $(".profilePopup:not(#profile_" + id + ")").hide(); } This works fine for me on IE browsers. However putting my DIV behind the table cell on other browsers. Even setting z-index for the DIV is not working in this
[jQuery] find text within the page
I'm looking for a way to locate keywords to help the end user out. For instance, if I want to find the word "polar" then i'd like my function to locate it, wrap it with a span, and assign it a function. so far I can locate using a content filter and classname like this... $(".keyword:contains('polar')") But this selects the whole element (paragraph, div, whatever) how do i focus in on JUST the text?
[jQuery] Tooltip Issue
Dear Folk I'm going to use a tooltip in my website I was wondering which one of these ToolTips In the Internet is great . thanks
[jQuery] Ajax: not understanding 4th param of $.post( url, [data], [callback], [type] )
I have stared at the docs for a while and still don't understand the purpose of the option 4th parameter in the $.post() method. The wording and examples at http://docs.jquery.com/Ajax/jQuery.post seem odd. E.g: [quote] Gets the test.php page contents which has been returned in json format (<?php echo json_encode(array("name"=>"John","time"=>"2pm")); ?>) $.post("test.php", { func: "getNameAndTime" }, function(data){ alert(data.name); // John console.log(data.time); // 2pm }, "json"); [/quote] We
[jQuery] Jquery.js include multiple times header / footer / etc.
Hi, I tried to search around for this but have'nt had any luck, so I'll ask here :) I use jquery.js on most of my sites. And most pages have it included in the <head> part. But not all of my pages, some are very old. Along with jquery.js, most pages also have jquery.flash.js. Now I recently needed to add something to my footer (which is included on every page) and I need to user jquery.cookie.js, and so jquery.js. Since not "all" my pages have jquery.js, I included in my footer both jquery.js and
jQuery Pagination
Hello, I am currently trying to use http://d-scribe.de/webtools/jquery-pagi ... ptions.htm but it just doesn't make sense to me as to what I am supposed to be doing. Anyone have any other ideas for how to do pagination with jquery and php?
[jQuery] Google maps
Hi, Hi have develop a google maps with a form at the top of a marker, but i want to register information by using ajax - $post(...) -. I've tried to manipulate the textboxes, but, with no success. <code> var infoTabs = [ new GInfoWindowTab("Dados", '<form id="" method="post" action="index.php?st=guardar">' + ' <div>Empresa</div>' + ' <div><input type="text" id="txtempresa" size="50" /></div>' + ' <div>Morada</div>'
[jQuery] Need solution for select element value change...
Hi, all... Here's the code: $(document).ready(function() { $('.agents').change(function() { $('option:selected', this).each(function() { Here's the problem: I would like for the function triggered in the code above by ".change" to work if the same value is chosen in the select element ".agents". Right now, the function following .change is only triggered if another value is selected. I tried .select, but that didn't work. I tried .click, too, but that wasn't satisfactory. Anyone
[jQuery] UI Tabs - change onClick behaviour
I have 6 tabs. I changed event to load tab content on hover for tab 'menu_zakladka3' I need to open page HTTP://SOMEURL instead of opening tab or load ajax data (this page has to read variables from the page header and check some cookies, so it is easier to not load with AJAX) How to do this? my code $("#nawigacjazarzadzanie > ul").tabs({ event: 'mouseover' }); <ul class="zakladkizarzadzanie"> <li id="menu_zakladka1"><a href="#zakladka1"><span>Twoje dane</ span></a></li> <li id="menu_zakladka2"><a
[jQuery] Accordion menue with up to 3 levels
Hi, I am wanting to use the jquery accordion menu with a structure up to 3 levels. Is that a) possible and b) has somebody a demo / tutorial for this kind of menu for me? Thanks! Heidi
Overlay (modal) that runs during AJAX calls
I just need something that would start on ajaxStart() and to close it on ajaxComplete(). Animated GIF would be a bonus, but text versions are also welcomed. I have found some solutions, but neither is what i am reallyl ooking for, so i am asking here. This is one of those ... http://www.4webby.com/blog/posts/view/7 ... oading_bar , but that's not overlaying. I use Impromptu plugin on same pages where i need this, which is great for prompting things, like asking confirmation and other things, but
[jQuery] Hide or show div depending on the value of radio button
I am trying to understand show/hide toggled from the value of a selected radio button. I know this topic has been addressed here often, but I cannot seem to apply other's answers. I have a series of primary radio button groups. Each primary group has a single associated secondary group. I want the secondary group to be hidden on load, but then toggled if a specific primary radio button is chosen. For example in the code below, I would like the secondary radio groups to only appear if the value "3"
[jQuery] Div's conflicting with each other
Hello all, I am using the jqGalScroll v2.1 Photo Gallery on my site. I have implemented the version that koesbong made at http://www.ryanbrenizer.com/wedding_portrait, but I am having an issue with Internet Explorer that I was hoping you can help me with. This is the Image Gallery in it's correct position, but it's making the buttons on the left not rollover or be clickable through the different sections anymore: http://idea-palette.com/testfolder/pagetest3e5.html This is the Image Gallery where
$.css() onload
Hi Guys, I was trying to fire an $.css() during the onload event. For some reason, it does not work. It works fine if I attach it to another event such as a resize event, but not onload. This is what I have done: function myFunc() { $("#example").css({'width' : 10px;}); } $(document).ready(function() { $(window).load(function() { myFunc(); }); }); I need this element to be sized immediately after loading. This works if the event was anything else, but dosen't work with
[jQuery] [plugins] [jcarousel] Add new item
Hi all, I'm trying to add new item on the fly with jcarousel. The function itemLoadCallback, didn't work to add item when you want. The plugin is build like this : $.fn.jcarousel = function(o) { return this.each(function() { new $jc(this, o); }); }; $.jcarousel = function(e, o) { ... } $.jcarousel.fn.extend({ setup: function() { } }); If i want to add an new function, how could i access her ? I want to do something like that : $('ul').jcarousel(); $('ul').jcarousel('add',options);
[jQuery] jquery validation on non java complaint browser
Since I started messing around with jquery, I'm astonished on how simple a java web form validation is.. the problem is when a person has a non java brower or disable it, then basically the java validation is useless! Now, since I use php I also have the standard server side validation but I was wondering if there are any shortcut that I'm not aware of, what is the best practice to handle a non java browser (like disabling the form on a non enabled broser?). Please enlighten me! Thanks David
[jQuery] append can not with form submit for IE
hi all ! i usage jquery appent 2 radio group to form. It work when submit in FF but does't work in IE. My code function checklistPanel (type, id,url){ var memory = false; var str = new String(); var newId = id.substr("1")+'-new'; var newIdo = id+'-new'; var currId = id.substr("1")+'-curr'; var currIdo = id+'-curr'; var button = new String(); var width = new Number(); var rows = new Number(); var title = $(id).text(); $(id).click(function(){ if(memory
[jQuery] DOM manipoulation after ajax load
Hello, I have the following case and I don't know what's happening... I have a sidebar #menu where in document ready I have: $('#menu).load('/menu') #menu is loaded with something like: <div id="menu"> <div id="level1"> various <a> tags </div> <div id="level2"> various <a> tags </div> <div id="level3"> various <a> tags </div> </div> Now I want to assign to each of the <a> tags some click functions. I do : $(document).ready(function() { $('#menu).load('/menu'); $('#level1 a').each(function(){$(this).click(function(){alert
[jQuery] DIV position
Is there any way to set the z-index of the div? I have series of hidden DIVs (in each row of table and clicking any of those would pop-up a information guide) Here is my code: function showProfile(id) { $('#profile_' + id).show("slow", hideAllProfile (id)); } function hideAllProfile(id) { $(".profilePopup:not(#profile_" + id + ")").hide(); } This works fine for me on IE browsers. However putting my DIV behind the table cell on other browsers. Even setting z-index for the DIV is not working in this
[jQuery] Need help validating a dropdown list
Hi all, I'm using the fantastic validation plugin (from bassistance.de) and have run into a little glitch. I understand the plugin doesn't currently handle dropdowns, but I found a possible solution on True Tribe (http://www.thetruetribe.com/jquery/1-jquery-api/68-jquery- plugin-validation-with-ajax). I can't get it to work, though. I'm pretty new to jQuery and am probably making an obvious error I can't see. Here's my jQuery code: $(document).ready(function(){ $("#reg_form").validate({ onfocusout:
[jQuery] access table row[y] cell[x]
I am (very) new to jQuery, and I have what I think must be a simple question. Without jQuery, I would write: var oCell = document.getElementById('myTable').rows[5].cells [2].innerHTML = "something new"; but I do not understand how to write this same line in jQuery. Thanks to anyone who can help. JAS
One element slides out while another fades out doesn't work.
Ok, I have a slide out menu that works great but when I want the logo behind the slide out menu to fade when the slide out menu comes out I can only get one or the other element to work. Here is my code: js: function() { var menu = $(this).find('.slide_menu'); var slide = $(this).find('.my_slide'); var logo = $(this).find('.header'); menu.hide(); slide.toggle( function () { menu.show("slide", { direction: "right" }, 1000); logo fades but slide doesn't work ----> logo.fadeTo("opacity", .5); }); });
Jquery UI Dialog - more then modal box withi different style
Hello all. I have been heavily reading the Jquery UI documentation and have not found this at all. I would like use modal dialogs throughout the site, however, several of these will look different. How do I do this. It seems the modal dialog uses the same classes. I know this can be done for tabs like this: $("#miniTab > ul").tabs(); //tab set 1 $("#mainTab > ul").tabs defaults = { navClass: 'ui-tabs-nav-main', selectedClass: 'ui-tabs-selected-main', unselectClass: 'ui-tabs-unselect-main',
[jQuery] DOM element as message when blocking element
I seem to have found a bug. If I try to use $('#someelement').block ({ message: $('#loadingMessage') }); Then when I unblock with $('#someelement').unblock(); the loading message is removed from the DOM, so any subsequent calls to block it fail and cause a JS error. Everything works fine if I block the whole page with $.blockUI({ message: $('#loadingMessage') }); then $.unblockUI(); but I don't want to block the whole UI. Is this a bug or am I doing something wrong?
[jQuery] How do I write a function to close shadowbox?
For my "success" callback (I guess that's what you call it...) I've got a series of events after an $.ajax post. Here they are: $('#contentdiv').empty().fadeIn(1000).append(response.login); $('#my_story').empty().fadeIn(2000).append(response.my_story); $('#email').empty().fadeIn(2000).append(response.email_address); $('#pass').empty().fadeIn(2000).append(response.password); These evens happen inside a shadowbox modal window. After the last one, I want to auto-close the shadowbox. The shadowbox command
[jQuery] [validate plugin] Why does it conflict?
Hello, I'm developing an open source banner server, and I encountered a strange behaviour. First of all the banner system uses jquery (apart from validation) to rotate the banners, using this code: var image_count; var current_image=0; $(document).ready(function(){ image_count = $("div.img-rotate").hide().size(); $("div.img-rotate:eq("+current_image+")").show(); setInterval(feature_rotate,5000); //time in milliseconds }); function feature_rotate() { old_image = current_image%image_count; new_image
Next Page