.position() against two targets
I want to position an item relative to two elements, using 'top' from one element and 'right' from a different one. I thought I would try callig position() twice, one for the vertical position and again for the horizontal. Unfortunately, as anyone who actually reads the documentation knows, if you specify only one value in 'my', the other is added for you. What I tried was this: $("#page_tools").position({ my: "left", at: "right+2 ", of: "#layout_wrapper" }).position({ my: "top", at: "top-40", of: "#page_content" });
Show/Hide multiple divs and swap out text
Hi, New to jquery. Found this great script, but it only toggles one div. What do I have to change to toggle multiple ones? $(document).ready(function() { $("#setup").click(function() { $("#1").slideToggle(function() { if ($(this).is(":visible")) { $("#setup").html("Close Archives ▲"); } else { $("#setup").html("View Archives ▼"); } }); }); }); HTML <h3>Title Here<a id="setup" href="javascript:unhide('1');"
Quarantine tests
Some CI tools (eg. Atlassian Bamboo) have the ability to quarantine tests that are failing for either expected reasons (or fail intermittently). Jenkins also has an open feature request for a similar thing. http://blogs.atlassian.com/2012/04/test-quarantine-continuous-integration-bamboo4/ https://issues.jenkins-ci.org/browse/JENKINS-14089 Is this something that has (or would be) considered for QUnit? Currently if a test is failing, your options are either: Fix the code (or the test) Comment out
inArray() allways return -1
i have a strange problem with comparing two arrays http://jsfiddle.net/paPF5/1/ The .inArray() Check always return -1, but i don't know why.
Ajax Post with data as JSON object. Unable to access data on server side
I am sending a .post request to my server attaching a json object to the data member. On the server side I can see the json data I sent in the Request.Form() member but I haven't been able to figure out how to access the individual data elements. This is my client side code: saveDetail : function(prmDesc, prmLevel, prmMax) { var lclData = { userId:'', skillId:'', desc:'', level:'', miles:'' }; lclData.userId = currUser.id; lclData.skillId = $('#selectSelectedSkills').val();
Using settimeout with progress bar
Hello, Im using a settimeout to resubmit a form. Id like to be able to use a progress bar showing the time until the next resubmit. Does anyone know of an example? Thank You
Ajax Autocomplete
Hi there, i am trying to get the jquery autocomplete to work, but i am new to javascript and jquery and i got a problem. I want to realise autocomplete via ajax call on my wordpress site. I think the json call is working. Firebug shows me that ajax returns a response in the form of: ["Name1", "Name2", Name3"] But my search field does not display the list of suggestions. How can i put the ajax response into the autocomplete suggestions? jQuery("#s").autocomplete({ source: function( request,
Scroll to position in horizontal div
I'm building a photo gallery function with jQuery. The thumbnails are in a fixed-with horizontal div with a scroll bar above the main image area, with "previous" and "next" links underneath. Everything is working great, but I would like the thumbnail div to scroll to the appropriate thumbnail image when the "previous" and "next" links are clicked. I've figured out a way to jump to the thumbnail image, but I'd sure love an animated scroll instead. Is this possible? Here's the page in question: http://brenahearn.com/fighters-jquery.php
How to get current/firing element of autocomplete combobox?
I use the autocomplete/combobox solution as explained here: http://jqueryui.com/autocomplete/#combobox Finally applied via a $('element').combobox() as in the example code. I use several comboboxes and I want to "empty" the value of, say, "combobox 3" if, say, "combobox 1" gets changed. The problem is that I cannot find out the id of that element. The cause of this is that combobox is actually "converted" to an INPUT element that shows the current selection of the comboxbox/select and it doesn't
ajaxform + file upload + random issues + using <textarea>
Hi, I've implemented ajaxform with file upload on this site: https://apply.salk.edu/?eid=a4826f4dd8643e5b5170a9fa60f9229d (Use 619-222-2222 to get the prefilled data) I'm having about a 10 in 100 fail rate for the file uploads, but I can't reproduce the problem on any of the browsers. I'm told the progress bar (blockui) just spins and never completes ... and the files sometimes do and sometimes don't upload. I have been capturing the user-agent strings of these browsers here's a sampling: Mozilla/5.0
jquery calcucation in email newsletter
Hi I need to develop a email newsletter which has some maths calculation, example A+B=C. Here A and B are input fields. And the result will be displayed in the mailer itself. I have develop a HTML page for it with jquery calucations. I tried to embed in the email newsletter, but the calculation is not working, How to embed this as email newsletter.
issue in iphone 4s
When i open a pdf link from my HTML page it opens the PDF and if i press browser back button blank screen appears only in iphone 4s(ios 5).When i open the console am getting the error as SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent."
bootstrap: copy/duplicate values from state/country fields
My twitter/bootstrap form has the option to copy already entered values into a billing info section. Text boxes are going in fine, but I want to duplicate the state and country values from these select boxes: <select id="countries_states1" class="input-medium bfh-countries" data-countryList="US,CA"></select> <select class="input-medium bfh-states" data-country="countries_states1"></select> I'm using this code as a guide: http://stackoverflow.com/questions/2706756/how-to-copy-the-shipping-address-to-billing-address
Scroll Horizontally Within Window
I am looking to have the window of my program follow a Mario img instead of scrolling, in essence removing the slide bar and somehow keeping the window focused on the Mario character within a range (like any 2D side-scrolling video game). Any ideas on how to do this using jQuery or HTML? You can find my program here. As seen, I have the upper and lower values I want the window to show, but I do not have a way of moving the window. It'd be best to move a coin counter, the music play/pause button,
mobile.loadPage problem if container has multiple divs
Hi, I'm trying to load an external url content to a div.When I use the Js code block below, the url content is displayed successfully. But divHeader is not visible because mobile.loadpage creates a new div under divContent, sets the url content to this div and newly created div's style is ui-page. When the style is ui-page it surrounds the whole page so divHeader isn't displayed properly. When i delete the class value "ui-page" from newly created div at runtime everything is fine.I couldn't change
Parse JSONP data
I've got an API that is producing JSONP output and I need take the data and read it into an unordered list. Can anyone point me in the right direction? As you can see I'm not sure what to put in the success event to show the data correctly. <scirpt type="text/javascript"> $(document).ready(function(){ $.ajax({ dataType: "jsonp", url: "https://my.site.com/", success: function(data) { }
problem using Scrollview.js
I'am using Scrollview.js for implementing the scrolling (https://github.com/jquery/jquery-mobile/tree/1.1-stable/experiments/scrollview /http://jquerymobile.com/demos/1.0a3/experiments/scrollview/ ) Since here Mouse events are disabled i'am having problems when used on Surface Tab ( A Mouse can be connect to a Surface Tab ) . On the Surface Tab i cannot click on say a Text box control so that it can have focus and so that i can type some data in it The same implementation work fine on IPad (Have
How to know wheter DOM was already loaded or not?
I plan to provide a JS code that each website admin could decide how/when to run, so an admin may want to add my JS code to be loaded with the page, or may decide to load it later once the DOM has already been loaded. So my JS code can not rely on the $().ready method because in the later case the code placed there would not be executed. So I plan to set my logic into a "private" _run() method, and tell the website admin that he must execute the "public" run() method. Within run() method I need to
get the id of the checkbox in onclick
how to get the id of the checkbox in onclick ? <input type="checkbox" id="someid_1"/> <input type="checkbox" id="someid_2"/>
version question
Gretengs to everyone. I'm a jquery begginer and have a question about version of jquery. The following code works in version 1.7.2 but doesn't work on 1.9.1. I've checked the documentation and the changes between versions and nothing says anything about fade() like functions or toggle(). Also, I've tried other selectors inside toggle function but none of them works. Here's the code... Thanks to anyone who answers. $(document).ready(function() { $('.answer').hide(); $('.main h2').toggle(
Using COM+ in jQuery
Hello. I am new to mobile apps. A lot of the examples I have seen are static pages. I have COM+ object that contains complex algorithms. It accepts a few parameters. I then goes pulls data from Oracle tables and does calculations. Ideally I know it should be some web service. Is there any ways to instantiate a COM object running in COM+ package, push some parameters, and pull some calc results from that object? Thanks Avatar
License change from dual to MIT
Hi Folks, I was browsing to see if I could understand when jquery changed from a dual (MIT or GPL) to just the MIT license. BTW, this is a really good move IMO. Also, looks like http://jquery.com/download/ still indicates a dual license under the "About the Code" section ... "jQuery is provided under the MIT or GPL license." although that link does point to the license page which indicates MIT only. -Scott Lamons SPDX Business Team, co-lead
How to open accordion panel from an external link
I am new to jQuery and really stuck with it. I have a WordPress site with the posts in jQuery accordion and a link to latest posts on another page. I am trying to open the specific panel of an accordion using the external link. At the moment when you click on the link, you move to the appropriate page and panel, but the panel stays closed. Here is the code I am using for the accordion: <script type="text/javascript"> $(document).ready(function() {Accordion();}); function Accordion() {
UI Portlets
I'm currently working with the portlets from the UI Library which is going well. I have coded the page so that when it is loaded all the portlets are collapsed, I was wondering if there was any way to make them open only once they have been dragged to a different column (i.e. Closed in Column A but then they open once you drop them into Column B). ? Any help with this would be appreciated
ColumnToggle inspired on a personal plugin without credits!
Hi to all, i'm a very happy jQuery Mobile developer and i'm very exited on 1.3 but I found that ColumnToggle widget is identical to a jquery plugin I released a year ago! It was Jan 19th 2012 when I wrote an article (italian) and a plugin who implement a responsive table design solution initially proposed by Filament group: Blog Article: (italian) http://www.consulenza-web.com/2012/01/mediatable-jquery-plugin/ Plugin Demo: (english) http://consulenza-web.com/jquery/MediaTable/ GitHub Repo: https://github.com/thepeg/MediaTable
Problems with links on loaded contents
Hi guys! I'm triying to call to a link that has been previously loaded by another link. Here is the situation: I have a "Link A" that load "Content A" (via Ajax). A "Link B" that load "Content B"... and then a Link to B in the "Content A" that has been loaded with the "Link A". I have made a sketch to explain it better: The problem is I can't use the "Link B" inside the content of A because there's no JQuery code in that page (I load the content from a different file to change between the different
jQuery mobile
hello everyone, I just use the jQuery Mobile and I develop on blackberry os 7. My html works with jQuery but didn't with ripple emulator...! The question is, jQuery Mobile works on Ripple emulator ? thank u :)
How to remove the active class of button on iOS
Hi, I am using JqueryMobile-1.3.0 and cordova-2.1.0 for iOS app. When I click on button then its color gets changed,but I want to make it normal after the onclick event get completed,I tried using $('#clearButton').removeClass('ui-btn-active'); but its not working.
Why does jQuery UI hardcode Verdana in the font-family?
I'm using jQuery UI via the jquery_update module in Drupal. It seems that the default theme for jQuery UI hardcodes font-family to Verdana, thus overriding my default font family and size. Why is this? Wouldn't it be better for the default UI theme to assume that there are already font definitions and just theme the special widgets?
I would like Autocomplete dropdown to follow caret
The behavior I'm trying to create is to have a jQuery UI Autocomplete widget attached to a multiline textbox (either textarea or contenteditable) that drops down the autocomplete suggestion box directly below the input text (i.e., just under the caret position) rather than beneath the textarea itself. The position of the dropdown should follow the caret as more letters are typed. I believe it will be easier for the user to see the suggestions closer to what he's typing instead of having to scan
How can I set the time of delay of moseover in a on()?
Hi Guys, I have a problem ... I want execute a function after 5 seconds that the user is on mouse over of a anchor ... I have an element that is dynamical loaded ... I have to work with .on() ... How can I set the time of delay? Code HTML: <a href="#" id="test">Test</a> Code jQuery: $(document).on('mouseover', '#test', function(){ alert ("hello"); }); thanks
Multipage document loading everything on first page. CSS issue?
Hello, I have a multipage document with slide transitions between the start page and each sub page id. However when I added a table with a custom CSS class and attributes inside the "data-role="content" div, it automatically loads on the first page, on top of everything else. If I remove the custom css table class, this problem goes away. How do I create a custom css class that will hide the table until the user has navigated to the appropriate page? Or can i wrap the table in another class I have
Praise for the jQuery Team
I just visited jquery web sites, and I was so blown away by all the fabulous changes, so much so that I have to give all of you associated with the jQuery Foundation immense praise! Job well done. I truly love the new appearance and the abundance of information. Just stupendous. I just cannot find enough adjectives to describe the impact each jQuery site had on me as I visited them. The best I've seen! Congrats and keep up the great work! Kelly
How to use setting only one time and then use defaults in jQuery?
Hi I am using datepicker UI so when a user click to edit a page the selected dates are depending one a value in the database fields. So how can i initialize the options only once. After that i want to use the original settings. here is what i am doing so the first part of the code need to set the current values and setting and then the file Reservation-edit.js has the setting to use after the load. The question is how to change the first part of my code to run once when the page is loaded. <script
Jquery plugin not working until you refresh
I'm fairly new to Jquery but have a solid understanding of HTML & CSS. I'm currently building an app which uses the Photoswipe plugin. If I link to the page with the plugin it doesn't work BUT if I refresh the page in a desktop browser, it loads. It doesn't work when compiled on a mobile device at all though (as you can't refresh). Any suggestions?
Difference btw android and iOS
I make a jquery website. I try it in iOS, it works fine. However, in Andriod, some device default browser work and some cannot. Also, it does not work on Opera of Andriod (iOS Opera is ok) (It can't switch page when press navbar) May anyone can help me. website : http://keithhui.dyndns.org/wedding/ Please help me... thanks all.
Autocomplte with geonames
Hello :) I am trying to use the source code from this page http://jqueryui.com/autocomplete/#remote-jsonp but I need to alter it a little so that the input field displays not only the full city name but also the state and country just like in the autocomplete drop down. I am really new at all this and I would really appreciate someone helping me on this! Thanks. Arthemis
jQuery SVG cannot transform text object
I am adding a text object using following code: svg.text(300/2, 540/2, 'Sample Text', {fontFamily: 'Verdana, Arial, Helvetica, sans-serif', fontSize: 42.5, fill: #000000, id: 'txt'});Now I want to rotate this object so I am using following code: $('#txt', svg.root()).attr('transform', 'rotate(90, 0, 0)) ;But this does not work. What to do? TIA Yogi Yang
jQuery SVG resize an object to size of container
I am loading an Image in jQuery SVG. Here is the code that I am using to add Image object to SVG canvas: var svg = $('#svgphone').svg('get'); var img = svg.image(0, 0, 330, 450, 'images/img1.jpg', {id: 'img'}); svg.title(img, 'img1');Here I have to give location and size of object that I am loading. But before I give the size I want to resize the object so that it fits within the container while maintaining it its proportions. Here is the HTML part: <div id="svgphone" style="width:330px; height:540px"></div>
Event Handler Memory Cleanup
Hey Peeps, Does jQuery .on() perform any automatic memory cleanup? Example: <button> has an attached jQuery .on() 'click' event handler. I whack <button> from the DOM. Is the click event handler left in memory? Thanks!
Next Page