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.
forum problem in iPad
hi i wondered there are some problems in jquery forum with iPad browser (safari). for example in "new topic" page, i can't type anything in textarea, when i click on textarea, iPad keyboard doesnt show up.
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'); } });
jquery ui autocomplete - restrict to the results
Hi How to restrict the input fields to the results that olny return form db or a variable. ex. When i write sth to the input filds and it havent any result I can't fill the input with it. There can be only the words that are exacly the sam as the method form db returned.
Drag & Drop question
Hi all, I'm new in this forum I learned jquery from 2 week and i'm fairly inexperienced. My site is build with asp.net mvc and use jquery 1.4.1 this is the code ... <% foreach (var item in Model.Amici) {%> <div id="amico_<%= item.Id %>" idAmico="<%= item.Id %>"> <%= item.Name %> </div> <% } %> .... <script> $(function() { $("div[id^='amico_']").draggable({ revert: "valid" }); $("#droppable").droppable({ activeClass: "ui-state-hover", hoverClass:
How to reload page when you click back button?
So I want when I click Back, that that page reloades? Any suggestions?
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");
jQuery.get(servlet url) should activate Java servlet?
I am trying to develop a web program that uses ajax with AppEngine. in HTML <head> part, I put... <script type="text/javascript">//<![CDATA[ function asyn() { $.get("http://localhost:8888/ajaxtestforpictures"); } //]]</script> and the java servlet is only... public class AjaxTestForPicturesServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { resp.sendRedirect("redirected.html"); } } the URL of the servlet (/ajaxtestforpictures)
Looking for input - Contextual Encoding for jQuery
Heya all - I have created a new plugin to enable jQuery developers to use contextual encoding in their rich client applications. I am an Application Security Engineer, project leader for the Enterprise Security API (Java and Javascript) and projects committee member at OWASP. This is an area that has been called out time and again as a problem child, something that there isn't an easy answer to. So I have written a plugin to try and solve this problem, and I am reaching out to the community of plugin
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,
Draggable misses targets after scroll
Hi, On my page I have a bunch of draggable elements and a bunch of targets. The part where it's a little tricky is the fact that the droppable elements (targets) are within a div that scrolls along with the page. What seems to happen is this: when you start dragging an element and never make the page scroll and drag to one of the targets, it works fine. On the other hand, if you start dragging an element and the page has to scroll (auto-scroll) which means in turn the floating menu with targets
How to make the datepicker move X numbers of months (not selecting a date)
I have two datepickers that allow users to pick a begin and end date. When someone chooses a begin date that is past and end date or an end date that is before a begin date, the field that is no longer valid becomes null. What I want to have happen is that the datepicker (the one that was set to null) would default to the month that the other datepicker is in. Is there anyway to simply move a calendar forward or backward a number of months without setting a selected date (setDate)? Just an example
Unofficial announcement of jQuery Conference 2011: San Francisco Bay Area
We are a few days away from announcing the conference details for the Bay Area conference that will take place in Mountain View, CA at the Microsoft Silicon Valley Research Center (Same as last year) on April 16-17th. In the mean time if you are interested in giving a talk at the conference you can now submit your talk proposal here https://jqueryproject.wufoo.com/forms/jquery-conference-2011-sf-bay-area/ Thanks and good luck. Ralph
Can't get rotator to work
Hello Everyone, I am trying to make a simple image rotator using JQuery. It seems to work for first loop however it does not iterate back to the start of images once it reaches the last image. I have tested and the code is getting the first image reference but due to some reason it is not working. Can anybody kindly help me. I have attached my code. Best Regards, Afraz Ali
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");
Missing theming info into sortable documentation
that's not a bug but i scraped my hand a long before my example was running... please add theming info to official online doc&demo about sortable. PS: you're making a excellente work. !
Help with jQuery Cycle Plugin pager with links
(ver 2.96) I've just started developing a project with this excellent plugin. I've looked around and found answers to most of my questions, but I still need some help. I'm displaying pictures above some pager buttons. I've figured out how to add my own text to the pager buttons but now my boss wants the the buttons AND the images to link to product pages. I can't explain it very well, so here's my development page. and my code: jQuery(document).ready(function() { $('#slideshow').after('<div
I want to set the title after every page is loaded (or "Where do pages get loaded by AJAX so I can hack this?")
The title string may be superfluous for mobile environment, but for desktop it is nice if the title changes as the user navigates the site. Previously someone suggested I "look at the downloaded page" to dig the title out that way. It was also suggested that using data-title attribute might be easier to handle, though I'm not sure why this would be easier. Is there really no easy to to do this? If not, Where in jquery-mobile should I look to try and start hacking this in?
Refresh problem
Is there anyway to refresh the page when you click back button? Mine stays loaded, and I need to refresh it because I have javascript which has to load everytime
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".
Issue with playing video in a page
I have my main page (main.php) which has a thumbnail list. When I click a list item, I go to video.php where I grab an ID and embed the src from a db result. The video plays and works fine. My question is when I hit the back button, the video will continue to play if it hasn't been paused or stopped. What can I do to fix this?
make append()-and-friends create elements like jQuery()
this $("body").append("<p/>", {id:"myP", class:"myClass"}); is better than $("body").append($("<p/>", {id:"myP", class:"myClass"})); seems a trivial and useful addition. thoughts? Leon
keeping navigation all the time...
HI All, I'm trying to use keep the header and footer elements on all the pages.. when i've a link like this: <a href='test.html'>Test</a> it loads the test.html but then none of the script or stylesheet in test.html gets rendered/executed... If i use rel='external' the scripts get executed but i lose the navigation.. is there any workaround for this? can someone please help?
JQuery Tablesorter Plugin Performance
We are using JQuery 1.4.2 and tablesorter plugin. We have a table with hundreds of rows. Tablesorter has been applied on this table. I ran a profile using FireFox for a dataset of 234 rows and noticed the following things - As you can see, appendToTable is taking the maximum amount of time and getElementText is being called 'infinitely'. This is creating a huge issue for our application. Is there any quick solution for this (other than NOT using tablesorter) ?
IE .post problem(?)
Hello, i do have a button where i use the .post() function to send via a file queries to insert stuff in the database. it looks really simple like this: $.post('file.php', { editpost:myvar }, function(result) { $('#msg').html(result).show(); });so when i click the button it works fine but on IE sometimes it crash or i dont know how to say it , it doesnt execute the ajax and when i try to reload the page it takes some time to fully load
Calling a jquery function from another jquery function
I'm a newbie to jquery and would like to do this: The function setEqualHeight(columns) fires on document.ready and works well. However, in the second function (the tab function) I would like to to call the setEqualHeight function in order to recalculate the div heights again. I would like to do this in the "onclick function". How? //Sätter kolumnerna till sama höjd function setEqualHeight(columns) { var tallestcolumn = 0; columns.each( function() { currentHeight = $(this).height(); if(currentHeight
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
jQuery Color Plugin
Hi, I'm very new to jQuery, so sorry for the stupid question! I created a little script to animate color background of a DIV and border color of another DIV in loop. I used the jquery color plugin and the script works!! (Unbelievable) The problem is that my script is veeery slow, and a i have problem with page loading (especially with IE) This is the script <script type="text/javascript"> $(document).ready(function() { spectrum(); function
Switching a css class
Hello... I would like to change the class of a div when a user clicks a button. The idea is for the footer div to be greyed out until the user clicks an answer. The button... <div class="eReportingAnswer">Yes</div> The div I want to change.... <div class="eReportingFooterContainer"> <div class="footerDeclarationText">By completeing and submitting this form etc etc...</div> <div><a href="foo.html" class="eReportingSubmitButton"></a></div></div> The jQuery.... $(".eReportingAnswer").mouseup(function()
Setting up a webplayer with playlist using <iframe> and <object> codes.
I'm having trouble setting up a webplayer on a site. I had set up the player receiving the files and set up a jwplayer with an xml playlist. I am then notified we won't be receiving files just <iframe> and <object> codes. The player I am using only supports this if I get a crossdomain.xml set up and that's not an option. What I need to know is how to set up a playlist that can on click play the selected <iframe> and <object> codes in a player window next to them. I am a beginner with javascript,
Identify a width that varies and apply a css style based off that?
hey there, new to jquery here. i'm just talking this out to get an idea of what i'm trying to do and how to go about it at this point. no real code yet but i'm trying to make it over the weekend so any guidance would be great. essentially what i want to do is identify the width of a div using jquery, and then have jQuery assign that width inline to the element negatively. for example (let's say this width is 110px after jquery looks at it) <div class="ineedyourwidth">lorem ipsum dolor</div> will
validator - submitHandler gets called even though invalidHandler happened?
So. I have this php page that we load in an iFrame, calls a js file with validator working on it, worked fine forever, still works fine. I made a copy of this page for another iFrame, same js files, same fields, almost identical basically accept that the labels and fields are now arranged in a table instead of paragraphs for a different look and feel. On this page though, when I do something that calls invalidHandler (like leave out a required field) I do get the error, but the page still submits!
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()
How do I "hijack" the ajax page requests for jquery mobile
When you click on a link, an ajax request is sent. Is there anyway to "hijack" it to lets say call a function if the request returns a 404 error, etc? Thanks
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);
Howto customize lookup of template variables?
Hi, With the template plugin, is it possible to customize the lookup of a variable ${foo}, or the evaluation of an expression for that matter... ? One of the reasons I'd like that for example is to have ${foo} by rendered with another (nested) template. But I don't want to template author to care about that. I don't want them to have to write ${renderWithTemplate(foo)} or something of the sort. Thanks! Boris
Next Page