updating children elements in cloned div
Basically, I have a button and a table that I want to clone when "Add new" button is pressed, and then append the cloned elements to the "items" container, but with updated id's and names - the update is done by appending the value of "num" attribute of "items". In the end I'll have to clone and update the id's and names for multiple input elements in the table found in the "default_container" - but right now it doesn't work even for direct children. HALP pls :( The problem (one of them at least)
Problems with submit button reloading page when there is an if...else statement.
Hey guys, I have a form that I perform some AJAX business on when it is submitted. However, I wanted to have an if...else statement but when I add it it allows the page to refresh upon submit. For example... $(document).ready(function() { // register form onsubmit function $('#register_form').submit(function() { // declare variables var input_email; input_email = $("#register_form_input_email").val(); // verify email $.post("emailverifier.php", { email: input_email }, function(data)
Hello All - Need Help
Is there any way and how to implement google map of my town in background of my website, and without zoom in and zoom out tool. Tnx in advance.
IE9 - Multiple appends raise an error
In IE9 the following code raises an: "Object doesn't support this property or method" in line 5460 of jquery-1.5.js <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />--> <script type="text/javascript" src="Scripts/jquery-1.5.js"></script> <script type="text/javascript"> $(document).ready(function () {
flexible .hide()
Hey, i would like to hide some <tr></tr>'s when the DOM is ready: window.onload = function(){ $('tr.nr39').hide(); $('tr.nr41').hide(); }The problem is that i would like to hide all tr.nr, not only nr. 39 and 41, and i don't know how many it will be. Is it possible to hide all <tr class="nr..."></tr> ? THX, Dominik
add items to a checkbox list
Hey i am having checkbox list and on top "add new" link. as i click on add new link dialog box appear exactly on checkbox list with form items and with submit button and as i click on submit button. checkbox list apear with new added items. Please help me, i am in trouble. Thanks
Using addClass() function with live()
I am trying to use the .live() jQuery function in cooperation with the .addClass() function, but I am unsure of how exactly to pass the parameter of the class-to-be-added's name through the live() function to work with addClass(). Here is an example of the jQuery I would be using: $('.mnav').live('click', function() { $(this).addClass('mnav-over').removeClass('mnav'); $('.mnav-over').addClass('mnav').removeClass('mnav-over'); });I would like to use addClass() in both instances in the code above
hover description for select, input and submit
I have few input box, selector and submition button in my form can I use a description on mouse hover like this example. The example for the links I tried to do some modification but unable to do any effect like the example page. So, I want to know can I do like this? If yes then how can I? Thanks
Appending Elements to a Section In IE
In IE7 and IE8, trying to do this fails: var $tagsection = $("<section class='links'></section>"); $tagsection.html("<p>test</p>"); //or $tagsection.append("<p>test</p>"); But changing the section to a div, works: var $tagsection = $("<div class='links'></div>"); $tagsection.html("<p>test</p>"); //or $tagsection.append("<p>test</p>"); I receive the following error: Line : 17 Char : 55207 "Unexpected call
FadeIn siblings One at a Time?
Hello ! Greetings everyone ! I'm a brand new user of JQuery, but I'm already falling in love with it! While experimenting with it, I've been unsuccessful trying to fade in the elements of a list One by One.... <ul id="listed"> <li>Company one</li> <li>Company two</li> <li>Company three</li> </ul> And with JQuery the thing I'm doing is the following: $( function() { //ready handler $("#listed").children().hide(); $("#listed").children().each( function(index) { $(this).fadeIn(1500);
jquery not following redirect
hello , i am using wcf restful services by .net with jquery , and I am trying to redirect from a service...but jquery is getting the response but not following the redirect , here is my code...can someone tell me what's the error?? I am getting the html page back this._Proxy = function (serviceURL, dataType, type, success, error) { //Sets the url to the given service url . this._URL = serviceURL; //Sets the dataType to the given type this._DataType = dataType == null || dataType
How do I make coda-slider slide not just a panel, but the whole screen?
Hi, I am trying to emulate some of the features of the site at: http://www.experiencialecom.com.br/experiencialecom/Portugues/ I like the fact that when you click on a menu item, the entire screen scrolls to the desired spot. I looked at the source code of this site, and it looks like they use jquery and coda-slider (a jquery application). I used the slider that is explained at: http://jqueryfordesigners.com/coda-slider-effect/ In my webpage, I do get the panels to slide, but I want to expand the
Count char in a textbox
Hi, i need a plugins or a UI , is some thing like count characters, for example i have a text box and max number of character in text box is 17 and i whan't to show the progres for example 14/17 (14 from 17)
Jquery animate fails when code is piped in from separate file
Greetings all! Hopefully this is the right place for this as I'm pretty sure this is a jQuery issue as the issue here is a fail on 'animate'. Here's the synopsis: I'm trying to create a menu where I have a three part horizontal div making up the layout: 1 2 3. 1 is the "Meat" of all this and the plan is to pipe code into there which is not a problem. I'm doing this by a menu in div 3 which calls a simple javascript routine that uses innerHTML to pipe a pre-loaded batch of code into an div already
Effect one after the other
Hi all I'm not to familiar with jQuery, I'm trying to use the effects slideUp, slideDown and slideToggle, and it working fine, Sometimes I want more than one effect to trigger on a single click, and this is fine I use the code below within a div tag OnClick="$('#pdfbutton').slideUp();$('#onebuttonbase').slideUp();$('#pdfgreen').slideToggle()" But I want the effects to trigger only when the previous has finished. And I'm not sure how to achieve this... Any help is much appreciated.
How to use div id and li together
I have created a dropdown by dom element and I want to do on click id value will appear in alert. I have tried this $(document).ready(function() { $('#dropList').click(function(){ $('li').click(function(){ var getmyId=$(this).attr('id'); alert (getmyId); }); }); });By this I am getting correct value but I have to click twice and alert appearing twice and thrice. I have also tried this $(document).ready(function() { $('#dropList li').click(function(){ var getmyId=$(this).attr('id'); alert (getmyId);
Adding XML nodes to an XMLDocument with jQuery 1.5
Hi there, I have the following code: $(document).ready(function() { // The DOM (document object model) is constructed // We will initialize and run our plugin here var tmp = [ '<person>', '<name>Richard</name>', '</person>' ].join(''); var xmlDoc = $.parseXML(tmp); var personElement = $(xmlDoc).find('person'); $(personElement).attr('type', 'vip'); // would like to append <age>28</age> to personElement $(personElement).append('<age>28</age>'); alert(xmlDoc.xml); }); On line 17, I would like to be
using jquerry accordion
is there any feature to slide the images in accordion form left to right and right to left with minimum time frame(delay)?
trying to implement two plugins on one page
i've come across an issue in trying to use two different plugins on one page. I'm trying to use the accordian and the lightbox plugins. i've read a few threads and pages, i've come to the conclusion that there are ways to do this. however in this case im wondering if it isn't time to learn a bit more about jquery. the two plugins are taken from tuts that use different versions of jquery, 1.2.3 and 1.2.6 now i know thats old hat and i think i should be trying here to get both working against a cdn
Chrome, 'show', 'clone' (or document fragments) and getComputedStyle
Trying to 'show' a document fragment that is hidden via a stylesheet rule fails in Google Chrome. An example is at: http://jsbin.com/ehano5/8/edit It looks like the offending API call happens at line 5901 of jquery-1.5.js. When calling getComputedStyle, Chrome returns "" for the display property, while FF (correctly?) returns "none". The temporary 'fix' is to append the item to document first. Or am I doing something else wrong? _jason
Continuation-style programming: are there constraints on the fx callbacks?
The documentation on e.g. the fadeIn() method does not specify any constraints on the callback argument. Does that mean that 'anything will work'? Specifically, is recursion allowed? <edited> Note that I'm not asking for empirical proof or suggestions on how to find out. I want to know whether jQuery design has deliberately taken this into account. Yes, I can read the source code. No I don't plan to do so (for now), since I consider it an essential gap in the documentation. </edited> Example
Accordian Slide
is there any option in jquerry accordion slider. in that the slide starts from 1-7 and comes back from 7-1. and it should be continuous with a specific time frame and also on click function.
trigger an event when someone type in a textfield
hi how can a trigger an event while someone is typing in a textfield, i tried this code: var srch = $('#txt_search'); srch.change(function(e) { alert(srch.val()) });but i got alert when the focus come out of the textfield, what i want is everytime user press a key & textfield.value changed, event triggers.
kill other request
hi i have this buttom, when user clicks on it, an ajax request lanches. $("p#next").click( function() { p++; $.ajax({ type: "POST", url: "content.php", data: ({'p':p}), success: function(html){ content_preldr.removeClass('preloader_bar'); content.html(html); }, beforeSend: function(){ content_preldr.addClass('preloader_bar'); } });
How to control the sequence in which commands are executed
I am a self thought web developer and am constantly having problems making sure that certain commands are finished executing before others are started. My most recent problem is trying to append a large amount of data, to a div, then sliding it down slowly. Since that data takes a while to append, the system is doing both at the same time, therefore not giving me the slide down effect. Here is the code: $('#SomeDiv').append(data); $('#image1').animate({"left": "+=300px","top": "-=200px"}, "slow");
Validating contact form - first time jquery user
Hey, I'm using the validator method from jquery with custom rules and messages. Most are working however I need help getting jquery to validate the phone number textfield as well as if the user leaves a radio button group unchecked. Here's what i want to do: Phone textfiled vaildation - custom messages saying "please provide a contact number" - if left blank "please enter numbers only" - if user enters text "number must be between 8 and 10 characters" - limit the range of the phone number for better
nth-type-of inverse
Hi. I have written the following function to return the index number of an element among its own types within its parent element, i.e. inverse of the selector function nth-type-of() (noti stands for nth-type-of-inverse()). Now because jQuery functions like parent() or children() turns the selected element into a jQuery object so that other methods can be chained to it, it isn't possible to use native Javascript utilities like nodeName or parentNode. Is there a way to write this code in just jQuery,
Using .trigger to open a file browser
Hello there, I'm trying to use .trigger on an anchor tag that basically shows an <input type=file> tag that opens the file browser. I would like to skip the step of clicking on the browse button to open the file browser and instead just open the file browser directly with the anchor tag "Choose File...". I'm using .trigger('focus') to do this. It does focus, but it doesn't click. .trigger('click') doesn't work either, and .triggerHandler doesn't do what I need it to do (I want the default action
Page load jumps to top when ajax gets data
I have a section at the bottom of one of my pages that gets data that can be further filtered by weeks. Users can click on any of the weeks to see the data that applies only to that week. This works just fine, but when the function finishes and replaces the html content of the div, the page jumps to the top so that the user has to scroll back down to see the results. I'd like to avoid that. $(".weekSelection").click(function () { var id = $("#stakeholderID_DDL").val(); var week = $(this).attr("week");
Page immediately refreshes itself wiping out my jQuery changes.
I have written code that looks like this. The code works great for about a split second and then the page refreshes itself and I am back to square one. How can I prevent the page from refreshing itself and wiping out my jQuery changes. The page I am working on is located here http://www.sepsserver.com/unvolado/ Thank you! [code] <script type="text/javascript" src="jquery-1.5.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#youtube').attr({src: '<?php echo $yturl
Trying to display text form field value on page
I have a standard HTML form that asks the user for a dollar amount and a payment date. On the same page I want to display some acknowledgement text which displays to the user what they entered above. For example, lets say the user entered 10.00 as the dollar amount, and 03/01/2011 as the payment date in separate HTML form text fields. Right before the submit button I would like to display to the user "By clicking on the submit button below, I agree to pay $10.00 to Company, Inc. on 03/01/2011".
removing unnecessary functions
Hi, I wanna only use the function fadeOut and fadeIn. Is there any way to remove other functions from jquery so I could have a lighter jslib !? thanx
Using jQuery with ASP.Net to swap images.
I am using jQuery with ASP.Net and VB.Net.I have an Upload control on the page where user selects an image to upload. After user selects the image, I would like a preview of the image to show up beside the upload control. The image control already exists and has visibilty. However, there's no src. It's blank. Image is an ASP.Net control, while upload is an HTML element. The function below gets called on the File Upload control's OnChange event. So far what I have is this: function changeSrc()
Adding auto-rotation to a function
Hey guys - I'm having some trouble, so it's time I look to the community. I'm trying to add auto-rotation to a photo feature. It's pre-built, so I'm looking to just mod the code, rather than having to rebuilt the entire feature. Here is the existing code: [code] function homeFeatureClick(event) { if (!$(this).parent().hasClass('selected')) { var selected = $('#feature .feature.selected'); var thumb = $(this); var index = $('#feature_thumbs a').index(thumb);
Question about live('click change')...
I've attached a click handler to checkbox label, so when you click it, it checks the checkbox. I also have an event handler bound to the checkbox itself. However, the checkbox event handler only fires when you click it, not when you click the label text (which does actually check the box): http://jsfiddle.net/ZBVnz/3/ Can someone tell me what I am doing wrong? Thanks. ...René
Disable TextArea on Page Load using JQuery
Hello Group, Simple question. How can I disable a textarea when a page is loaded(and re-enable it on a button click). I have tried several things with no luck. What I have tried is at the bottom. Here is my code snippets: ' code to generate the text area <%=Html.TextAreaFor(Function(model) model.NewestComment.Comment, 2, 60, New With {.id = "comment"})%> ' JQuery Code I have tried to disable it.... <script type="text/javascript"> $(document).ready(function() { $("NewestComment.Comment").attr("disabled",
Populate treeview
Hi, I need to develop a webpage that loads a structure of products. I managed to do this using PHP and JS, but many details are still lacking. I found some topics about jQuery and treeview, but I still did not find a code what if it adapts my necessities. I am going to explain better: 1. each product can be a son of more than a product; 2. over there to show the structures, in the same page there is a box of text for search. While finding the text and he will be in the precise structure to detach
hide/Show methods
Hello I use use "hide and show" to show and hide a ul. First when the document is loaded. And when i click on link. I want to let the ul showed ou hidden when the page is reloaded. Is it possible : My code : $(function() { $("ul li").hide(); $("link").click(function() { $("ul li").toggle("normal"); }); });
How to stop drop down from listing all sub menus?
Hi - Please see this link to my site. If you hover over the 'Shop' menu in the main navigation, all of the second sub menus appear under 'Illustration', 'Apparel', 'Lifestlye', but then jump back when you hover over each sub menu. I would just like list the 'Illustration', 'Apparel', 'Lifestlye', menus to appear when you hover over the parent 'Shop' menu but then reveal each second sub menu in turn when you hover over their respective sub menus. Can anyone help? Hope that makes sense. If you look
jQuery.browser
It's a shame that jQuery.browser will be moved to a plugin in a future release of jQuery as jQuery.support is not sufficient to cover all cases where jQuery.browser is needed. The most recent examples I encountered were: IE css filters html5 support css3 support I hope it might be reconsidered?
Next Page