Adjust Display elements position
How can I do that in my example (http://jsfiddle.net/samuvk/sMqKA/16/) that the position of the display can be adjusted. When the last item (unlimitedwonders) display, the two items display are two far on the left that they cannot be reach. Is there any way that the elements display are adjusted to the positions of the "father" element? Thanks
refrencing object
hi , i know how to define an jquery object and reference it to an id . take a look at below $("#element"); now i want to know what is the different between this $("#element") and this $var = $("#element"); do they have any different .
need a grid plugin
Hi, I am looking for a jquery mobile grid for asp.net mvc4 platform(using Iphone emulator), which has features like column resizing, column hide/show, column drag/drop, setting column order on user preferences, multisorting, paging, filtering. I have looked for many grids on web but no one gives so many features. Does any one have any idea for such a grid? Thanks
diffrenet between storing selection into variables
hi , i have stored a selection into a variable .take alook at this $("#container_show_subject #update"); var $var1 = $("#container_show_subject #update"); i can use attr('id') for the first one and return back the id but for the second one i can not use an id attr , i dont know why ? can you give me an example , of how doing it ?
Information Box Problems
Hello everyone and thanks for your help in advance. I developing an ASP.Net webform that has certain help items, that when clicked, use jQuery toggle to display the informational div. These links are placed within columns on the page. Currently, when the link is clicked and the div displayed, the columns are shifted down and to the right. I would like to have the div overlay the page content. Here is my CSS and page structure: <td class="menulist"> <span class="menuname">Insurance
Autocomplete selected item value need to pass to server
Hello, I am using autocomplete for searching by agent name. Everything working fine. What I am looking is, once user selects a name and finally submits the page; I need to send selected agent id to the server. Just like drop-down feature. Could someone send me a sample? response( $.map( data, function( item ) { return { label: item.fname + ", " + item.lname +" "+ item.middle, value: item.fname + ", " + item.lname +" "+ item.middle
Popup overlay on Android
I have a weird issue with the overlay for a popup on Android... I haven't had a chance to test this on iOS but I have a simple page with a left navigation panel, a header, and content. On the header I have a button to open the panel and a button to load a popup. Everything works but when I open the popup, the overlay has a large square in the upper-left corner of the window... the rest of the content fades as normal using the overlay. Does this have something to do with my panel or am I just not
window.close won't functioning?
Hello i'm new to jquery. I just want to ask a simple question about window.close function The scenario is I created a popup dialog that the user may enter or add another comments using jqueryui which contains a webpage that displays user comments. There are two textfields. One is Category Name and other is Description. Below is the OK submit button and CANCEL button. Before i used the function onclick="window.close();" function i embedded it in my <input type="button" /> but when i tried to run this
I replaced jquery files with more modern versions and broke my application...
I was given a website that used two outdated libraries: <script type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script> <script type="text/javascript" src="scripts/jquery-ui-1.7.2.custom.min.js"></script> So I thought I'd improve things by using more modern versions. Instead, I broke the website. This is what I replaced them with: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"
Asynchronous Constructor Instantiation and DOM Insertion Within Loop
Hey All, How can I best execute code with an async callback in a loop? At this point I'm using a callback from a setTimeout zero. Meh. For example, here I instantiate 1000 Button objects from the Button() constructor function, and insert them into the #pageContent div. // Happily adds buttons to page one at a time, as they are instantiated var $pageContent = $('div#pageContent'); for (var count = 0; count < 1000; count++) { setTimeout( function() { var myButton = new Button();
Help: Overwriting existing URL in Fixed Header
Dear all, My name is Leander and I'm about to launch my first jQuery Mobile solution (named: Fixed Header). And I have to say I'm really pleased with the result already. I do have one question. If you click this link here below and go to the menu icon on the left top to select another page the URL is will be pasted behind my current URL. How can I make sure the new URL will overwrite the existing one? Included the # hash sign at the end. This # hash sign will show once I've opened the sidemenu (bit
Loading details on the index page
I'm developing an app in which I load all the pages in the index.html using jQuery. On the loaded pages, there is one particular page which comes along with links which when clicked takes you to another page to give you details about the link you clicked. Now I want to be able to load the details of the clicked link into a particular div in the index.html called news_details. How do I do that? This is the code I'm using for the links: <a href="index.html#news_details?<%= Server.HTMLEncode(MM_keepURL)
No real header for programmatically popup?
Hello, I want to programmatically open a popup but the header isn't shown properly, i.e. not centered and not with background: $("<div data-role='popup' data-overlay-theme='b' data-theme='c' class='ui-corner-all'><div data-role='header''><h3>My header</h3></div><div data-role='content' data-theme= 'd' class='ui-corner-bottom ui-content'>My Text</div></div>") .popup() .popup("open"); If I open an existing popup with header with .popup("open"); it will be shown but if I change it with $().html()
Problem using multiple autocomplete combobox
Hi, I have a problem, I'm using three jquery autocomplete combobox and I need execute a function when the user select an ítem, this for each combobox, but I can't do it, all my combobox are filled from a database and according to this example http://jqueryui.com/autocomplete/#combobox I can't assign a function for each combobox because when I write the event in another script, for example in the head, not is executed any event, but if i write the change event inside the jqueryui's example, it
Superfish menu centered
I have centered the Superfish Navbar menu on the page but struggling to find a way to center the first level sub menu on the page. Any help is greatly appreciated guys. Thanks.
How can I get an Icon after resizable textarea in the same row?
I am trying to get on one line a label, a resizable textarea and an icon for looking up a value. Unfortunately the icon is displayed on the next line instead of on the same line. The code is as follows: <div class="row"> <label>Label text</label> <textarea class='resize">Textarea text....</textarea> <img class="iconname inline"> </div> $(.textarea).resizable({handles:"se"}); The problem is that the image is displayed under the textarea and not after on the same line. When I remove the "resizable"
jQuery Mobile "latest" CDN not displaying header/footers right
Given a simple page with a header and footer, if you use these CDNs: <link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" /> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script> Then they do not display a dark background. I discovered that the 'latest' branch is pointing to 1.4pre. Is it the expectation that "latest" will equal something not release, ie Alpha/RC/etc,
Searchable dropdown that works with data from 2 endpoints
Hi - What I want: A dropdown that loads all of a user's local contacts; but when user types to filter it searches a larger directory at a different endpoint. I like the initial loading of a user's local list. It makes selecting quick and easy and you don't have to type to find people you normally search for. Problem: If a user wants someone who is not on their list they have to hit a different endpoint to search the directory. I'm currently using Select2, which is awesome. But I can't find any
DATEPICKER TEXT POSITION
Hey, i would like to position the date text i got when i select a date from the Jquery... can we do it in css?? if yes help pls :) How my text looks like at the moment :S http://www.hostingpics.net/viewer.php?id=658136Sanstitre.png thanks for the help!! :)
jcarousel - adding swipe function for mobile
Hi everyone, I built my website 3 years ago, the portfolio gallery is built with jcarousel. I'm trying to find a fairly quick solution to build in the swipe functionality for mobile users. I just cannot find a solution that works anywhere. Sure there are a quite a few links when I do some Google searches but I've tried most of these ideas and none of them work. None of them create a swipe ability but they also disable other jQuery functionality on the page. My website is http://www.lemmondesign.co.uk
Not able to open the second tab on page reload
Hi, I have an apsx page with jquery tabs control (using ver 1.10.3), on the second tab I have 2 txt fields and a search button then a grid view table for the results. When search button clicked, page reload happens & tabs goes again to the 1st tab, i need to stay in the second tab or (last tab before page reload). I tried to use the following code but it doesn't work correctly: <script> $(function () { $("#tabs").tabs(); var active = $("#tabs").tabs("option", "active");
Key Value Pairs Conversion has me scratching my head
I have an object that looks like this: { "KeyValueOfstringstring": [ { "Key": "FET", "Value": "" }, { "Key": "FFS2", "Value": "Z" }, { "Key": "LoadIndex", "Value": "91" }, { "Key": "Ply", "Value": "" } ] } And would like to transform it to look like this: { "KeyValueOfstringstring": [ { "FET": 123 },
show hide on click using on
I am having problems with toggle() called inside on here is my script function tblBodyShowHide(){ $(document).on('click','a.showHideTblRows',function (event){ var tbody = $(this).closest('table').find("tbody"); var thead = $(this).closest('table').find("thead"); if(thead!=null){ thead.toggle(); } tbody.toggle(); //event.preventDefault(); return; }); } $(document).ready(function(){ tblBodyShowHide(); } is there anything wrong in the function? on debug I see table body is hidden and when
div change background-position
Hello all , i have div with background image and some li so when i haver the li the background-position change have look in to code here HTML Code <div class="home-banner">
<ul class="services">
<li class="item-1"><a href="#">love</a></li>
<li class="item-2"><a href="#">love o</a></li>
<li class="item-3"><a href="#">love 2 <br> Marketing</a></li>
<li class="item-4"><a href="#">love 3 <br> Optimization</a></li>
<li class="item-5"><a href="#">love
probelm with script inside ok function in a a dialog
I have a submit button with onclick script which works now I wanted to show jquery dialog and on click Ok execute the button script here is the button <input style="margin-top: 1em;" type="submit" value="ADL" class="submitbutton ui-button ui-widget ui-state-default ui-corner-all" wicket:id="adl" name="noFindingGroupsBtnsContainer:adl" id="adl2b3" onclick="var wcall=wicketSubmitFormById('reviewForm2b0', '?x=Dey9PT2gy1YuenfaMGBagUANwBRKlaVd5huPWU-oPNBYUDs*nz1v8hztWlx3FiLFwcq1iD0dcAtS0IBc-6h9fgMeoyFtWfNxH**95XJRikj9MY-Lk6b*ifDHBe9eO93BddF814Ut612AETOd4t7ing',
Managing optional lines of HTML
Now that I have a global variable that tracks clicking an anchor (see https://forum.jquery.com/topic/global-click-variables), I have a set of HTML lines that need to be included or removed depending upon the state of the flip/flop. In one case .html("") and in the other .html("some html text"). The html text is created by successive concatenations to a string but this gets rather messy. Is there a way to include or skip normal looking lines of html leaving them easier to edit? Here's what I have
functions with jquery animations, wait till one finsihes before the other starts
the animation works perfectly if you open and close the same tab, but as soon as u start clicking on other tabs it bugs up a little this is because when u click on another tab, it closes the current one if i can make the opening tab wait until the current tab closes, i think the bug will be fixed, but i don't know how to do that the javascript is at the bottom of the page http://patrickallard.net63.net/ and ill post it here for convenience sake [CODE] <script> //page dimentions var tabWidth=300;
Charset with Ajax method
Hi, I'm just starting with jQuery and I have a short question about the Ajax method. I've the following code: $.ajax({ url: "scriptx.php", contentType: 'application/x-www-form-urlencoded; charset=ISO-8859-1', beforeSend: function ( xhr ) { xhr.overrideMimeType("text/html; charset=ISO-8859-1"); }, data: { p : arg }, statusCode: { 404: function() { alert("page not found"); } }, success: function( data ) { $( ".content" ).empty(); $( ".content" ).html( data); } }).done(function()
Replace apps browser message "page not found"
Is there a method whereby I can get my HTML5 jquery phonegap app to not show the default "page not found" when the link to the server fails. I need to handle it myself and my message works fine but is immediately followed by the default "page not found" message, which I do not want. How do I stop it?
FadeIn a value from a hidden input once it is set.
One of the things this code does is to set the value of a hidden input, #selectionveg1, and sets the text to be displayed via <span id="spanselectionXXX>. I would like to fade in and out the text when it changes. I tried using .fadeIn and .change, but I don't think the span element is right for this. Any suggestions? $("body").on('click', '.yes31', function() { var parent = $(this).parent(); var gpar = parent.parent() gpar.addClass('opt31selected'); var thing = gpar.attr('id');
can i use juery to change image on browser's resize?
Hello. I have a div w/an image. when the user resized the brower I'd like to have that image change to a smaller one. I know i can use the css @ media query for background images/css but is there a way to do that for the images placed in the html's divs? thank you D
Injected html doesn't get jquery mobile CSS style applied
with reference to http://stuartmcintosh.com/test/index2.html http://stuartmcintosh.com/test/myJavascript.js http://stuartmcintosh.com/video_links_body.html versions used: http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css http://code.jquery.com/jquery-1.10.0.min.js http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js my basic html5 page is able to display a listview with the proper style, but if I try to load some html from a file using pagebeforechange to intercept the click
(window).load or (document).ready to initiate page?
I've been working on a page, with help from people here, and learning jquery. One of the things the jquery script does is to display a sum (a dollar value) of options selected. There is a starting cost for the item, and the options selected change the final cost. So, when the page loads, it will display a dollar value of like $5.00. Initial value and option values are stored in hidden inputs, which I didn't include here. jQuery(function($) { $.fn.total = function() { var sum
Troubleshooting Cycle2 Slideshow elements.
I'm using the Cycle2 slideshow plug-in for a website I'm working on right now. I wanted to center the slides, add informational overlays, and add prev/next controls. None of it is working correctly. The slides (which are all different dimensions, but fit within the container of the slideshow) won't center, even though the demo says all you need to do is copy and paste a few lines of code. The informational overlays do not appear as overlays, they appear as a caption beneath the slides. When
Back button is pressed on browser without plugin
I have a website that has multiple containers with titles. When you click on the titles it hides the rest of the containers and then goes to the same page but with a hash tag. Then when you click the back button it goes to the page without the hash tag though the jquery is still in effect with the hidden containers is there a way to reload that page so that the jquery is reset that doesn't use a plugin?
JQuery Access-Control-Allow-Origin Issue
How do I get rid of the following error message XMLHttpRequest cannot load http://api.sba.gov/geodata/all_links_for_city_of/Evansville/IN.json. Origin null is not allowed by Access-Control-Allow-Origin. Here is my html file <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <title>County Lookup</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <script
HTML5 doctype and my smoothscrolling doesn't work anymore !
Hello, For my vertical website, I used to code in HTML4 Transitional and put a little script in order to smoothscroll through anchors : $(document).ready(function(){ $('a').click(function(){ var id = $(this).attr('href'); scrollTo(id); return false; }); function scrollTo(target){ if($(target).length>=1){ width=$(target).offset().top-130; } $('body').animate({scrollTop:width}, 1000); return false; } }); All of this was working before I switch to HTML5. Now,
passing variables into a function
there are two ways a fucntion can be called in responce to an event $(this).click(function(){}) and $(this).click(sam()) function sam() {} using the second one if i want to give it the text string "ginger" as a variable i would do this var text = "ginger"; $(this).click(sam(text)) function sam("varone") {} How would i do this when using the first method of calling a function? UPDATE the second example does not work if i try to pass in any variables, it has to be $(this).click(sam); not $(this).click(sam(variable))
jQuery static menu too much code
Hi, I just started with jQuery and I wanted to do a website with 4 menu buttons and after I click them only content div will change. So i did something but I have too many lines of code for this simple task. I hope somebody can explain me how to to thing more efficiently. This is my index.html page <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link type="text/css" rel="stylesheet" href="style.css"> <title>Rainer TestPage</title> <script
Wait until image is loaded
Hi, i need some help here, I need my code to execute something BEFORE image is loaded, but I dont know how :(
Next Page