$(document).ready() for certain situations?
I have a site where I need to send outbound clicks to open in a new window (yes, I generally understand this is not the recommended behavior.) The way I have it set up now is using $(document).ready() because if I put it in pageinit it binds multiple times as you're navigating pages in the site. $(document).ready(function(){ $('.block').on('tap', 'a[data-outbound=true]', function(event){ window.open(this.href,'_blank'); return false; }) Is there any reason this is a bad idea
Clearing <input> without triggering HTML5 Validation
Hi! I'm still getting the hang of HTML5 Validation. I'm loving it overall, but I've run into something I can't find the solution to. I'm trying to clear an <input> element with the required attribute without the browser triggering validation. Up until now, I would just use $("#myInput").val(""); But that leaves the field "invalid" with a red border around it in Firefox. So now I'm wondering what the correct way to clear the element is without triggering validation. Has anyone had any experience with
Noob having trouble with selectors on divs
I'm sure I've not formatted something properly, but I can't find it. I've been learning jQuery and experimenting with .text() and .html(). I'm particularly interested in changing the HTML content of a <div>. I tried working my way up through <p> and then into <div>. You can see my various attempts listed below and a comment showing whether or not they worked. Obviously I hit a snag with <div#id>. I thought I might have to .empty() the div first, but that did not work when I added #id. Can
Set dialog width according to browser width.
I just set the width property as width: ($(window).width()*0.9), resizable: true, and it worked .. but when I re-size browser I don't get resized dialog, it shows the same size.. not even adding scrolbar. How to set that dialog property?
Changing input charcter on keypress Event
Hi there, I am newbie here and learning jQuery. I have a strange requirement of changing each of 8 characters of an input box as the user types in any character from the keyboard. I want to change each and every character typed in one by one. for an example, i am keeping maxlength is equal to 3 and default value none. And if user types "cat" i wanna show this it in input box as "dog" but as he types. if he types character "c" i want to change it to "d' and when he types 'a' it gets changed to 'o'
Loading page in 1.3.0
Hi. How do I modify this code or where to add (example taken from starting guide) to show a loading page: I just added a link to page2.php in content section. Thanks <!DOCTYPE html> <html> <head> <title>Page Title</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0-rc.1/jquery.mobile-1.3.0-rc.1.min.css" /> <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.0-rc.1/jquery.mobile-1.3.0-rc.1.min.js"></script>
Slide content right?
So, I would like to know if there's a way of doing this: if you go here: http://britneyismyreligion.tumblr.com/ and click on Askbox, a content will slide down. I want to do the same thing, only sliding right instead of down. Can I do it?
navbar with <ul></ul> throws error about nth-child
Hi, jQM 1.2.0, 1.3.0-rc.1 <div data-role="navbar"><ul></ul></div> throws an error out of jQuery. Reason seems to be that in $.fn.grid = function( options ) { at about 5572 ) the variable grid is null resulting in an undefined value for iterator. Inserting a check for zero children after if ( !grid) (5556) seems to fix the problem if ( $kids.length == 0 ) return; Dan
jquery mobile swipe event is not working
i want to add swipe event using jquery mobile. swipe is working when i click on preview button of tizen ide.when when i run the application in tizen web simulater application,swipe event is not working.i just include the jquery and juery mobile js file.Have i need to add any additional js file for swipe event? here i am using fullcalender.js for creating calender. <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
cannot retain focus on input either using timeout or focus
attempting to use inputs and validating as tabbing through. focus did not work so I'm using a setTimeOut that I found on this forum. This only seems to work on the first input not on the rest as I work through the inputs. link to javascript link to form
help plugin
I am searching for embedded help systems for web applications and some of them I found are talking about using jquery embedded help, http://www.embedded-help.net/ this is the link it points to but I cannot open this link, this link is not working. any advice on if this is still alive ? or suggestions on creating help systems for my web applicvations any jquery plugins ?
prettifier
Olá usuários! Em meu forúm, eu tenho uma tag BBCODE que em HTML ela é .cont_code então gostaria de saber se tem como adicionar a esta tag o código prettifier para colorir as letras de códigos que vem nessa tag, pode ver ela nessa página: http://shdesign.ativoforum.com/t96p15-personalizar-botoes-na-area-mensagens-privadas#356
Creating a jQuery Responsive Site with Style Switcher
Hi, I am a newbie with jQuery and in the past weeks, I have been working to put together a responsive test site with a lot of jQuery scripts. Some of my jQuery scripts are not working right. I believe that I am making mistakes somewhere. I hope you can help. 1. I created two test navigation menus (one red and the other orange) and I want my users to be able to use the style switcher to choose a menu. I also want the user to save the selection as a cookie using the jQuery standard cookie plugin that
how to do a show and focus on form
I have the following jquery code that hides a form, but if you click a link it shows the form. It works correctly but I can't seem to set the focus on the form after the show. After i click the "show_form" link the pages goes up to the top.. how can i make this work <script type="text/javascript"> $(document).ready( function () { $("#form").hide(); $("#show_form").click(function () { $("#form").show(); // the focus doesn't work $("#form").focus(); }); }); </ </script>
Show/hide table
Hi, I have a structure like this: <table> <tr> <td><img src="openclose.png"/></td> <td><table>.....</table></td> </tr> <tr> <td><img src="openclose.png"/></td> <td><table>.....</table></td> </tr> </table> All rows of the outer table is generated through a <c:foreach> I want to toggle the view/hide of the inner table when the corresponding openclose.png image is clicked. I did try a few examples available on the net
Fixing the first column of a table
Hello everyone, I've been looking for a nice solution to generate a table which has a fixed column. Although I found some libraries, it did not well work. I already know DataTable and some famous libraries; however, it doesn't work for mobile devices. Could you please answer to my question?
google analytics for jquery mobile 1.2
Greetings, I'm looking for the definitive answer for using google analytics in jQuery Mobile 1.2. I've tried all of the usual suspects out on the web, but none seem to be working. It would be great if this were posted somewhere within jQuery Mobile content, if it is please point me that direction. Thanks so much for any help. Here's what I have that's not working: <head> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'MO-XXXXXXXX-X']); _gaq.push(['_trackPageview']);
(jqm 1.3) keeping the panel visible/ static across pages
I'm looking forward to using the panel as part of my UI design. It's simple, but it's beautiful. The panel functionalities however look limited. For example, if I wish to navigate across pages, can the panel remain unmoved? A similar functionality will be the static header, which does not move when navigating across pages. If there's a way to do this, do share.
jquery mobile button extending off page dimensions
I have a mobile website I have been building and the buttons are extending off the page for buttons with longer text. I have noticed when I used the built in columns in jquery mobile, it auto truncated buttons who's text would other wise have them extend past the page width. It did this by having the button text just have "...." at the end where it needed to cut it off. Because of how my page is for formatting I did not want to use the double or triple columns for my page as I wanted the buttons
(jqm 1.3) how to keep the panel visible at load?
Hi all, I searched the documentation, but there's no mention of having the panel show at page load. Is this possible?
Uncaught TypeError: Object [object Object] has no method 'cycle'
Sorry for the double post. forgot to add website: http://winstonduke.com and the error i'm getting is: Uncaught TypeError: Object [object Object] has no method 'cycle' Not sure how to solve this problem.
Spinner value not updated?
Hi, I'm using spinner widget for the first time. I have a number of text fields width numerical value. For every input field I have a spinner. Everething work fine when I submit the form, but I have a strange behaviour when looking in the source code with firebug: <input type="text" value="12" name="prop[70]" class="size ui-spinner-input" aria-valuemin="0" aria-valuemax="100" aria-valuenow="13" autocomplete="off" role="spinbutton"> A the time I'm looking at my code, I can see in the text field the
mouseenter vs. click
Hello, First I was developing my code in javascript and facing one issue, I deceided too sxitch to jquery. But the problem stil happends... My <body> is made of one <canvas> for sizing the background and various <div><object></object></div> that I position on the canvas, and that I would like to make clickeable. Here is my code, no problem for the positionning and sizing, but I have a problem in the bind function : - mouseenter/mouseleave are treated properly, I can see my alert boxes entering and
keep different checkbox checked jquery mobile
Hi, I'm using jquery mobile on phonegap and as the title says I want to keep checkboxes checked with the "refresh" method. I can achieve this with radiobox but not with checkboxes. How I do this with radiobox is for exp.: if(user.gender !==null) { $('#toughest_challenge_id_' + user.gender).attr('checked',true); genderBox.checkboxradio("refresh"); } where user.gender is the function containing the fields of my database. But how I can reach the same with checkboxes? p.s. the objective is to memorize
Jquery Handbook
I am looking for an authentic Guide/Handbook to Jquery. Help appreciated. Thanks.
Can't figure out how to pull variables out of json array
I need to pull the variables out of my json array using a loop. I just cannot figure out how to do it. Here is my json: [{"date":"Nov 02 2012 12:00:00:000AM","sum":-16481.039,"from":"Jack Leider","to":"Richard MacDonald"},{"date":"Nov 02 2012 12:00:00:000AM","sum":-4637.155,"from":"Jack Leider","to":"Richard MacDonald"},{"date":"Nov 02 2012 12:00:00:000AM","sum":85900,"from":"Jack Leider","to":"Richard MacDonald"}] Here is the javascript I currently have: var json = jQuery.parseJSON(orders); for(order
change background color of different header cells
change background color of different header cells. Must easy any ideas
form with validation error messaging
I have a long form and I have setup some validation but I'd like some help tidyuing it up and enhancing my requirements. The following displays an error message but its messy. I'd like to know how a) Highlight the whole row b) Put an asterix at the end of the appropriate item. c) Any other techniques you think good. Also can you explain to me why, when its validated the Address fields go out of alignment with the other text fields. If possible could you tell me how to (in realtime using ajax)
Reading Files in jQuery using Files API
Hi Geeks, What is the best possible way to read to read local files using jQuery and Files API.. Can anyone give me a quick example to convert following code in jQuery or point me best possible solution to achieve this? <input type="file" id="files" name="files[]" multiple /> <output id="list"></output> <script> function handleFileSelect(evt) { var files = evt.target.files; // FileList object // files is a FileList of File objects. List some properties. var output = []; for (var i = 0, f; f = files[i];
jQuery code Not Working,When i am changing the file extension from .html to php ??
Hello help me out ... i wrote a simple ,show and hide login form in html with jQuery .. Now i want to use that login form as a php file when i save the file as .php file the jQuery code is not working any more.. any idea were exactly im going wrong or doing wrong ??? Thank you Regards
Redirect to a web site and close the InfoPath from a button
I’ve implemented the below solution on two different InfoPath forms for a cancel button to re-direct to the main page. Publish the InfoPath form to the SharePoint, then create a web part page, add the InfoPath form web part and select the form you published, then add a content editor web part. Then press F12 of the web part page to get the button id in the InfoPath form web part. Then add the following JQuery code in the content editor web part HTML source. <script src="http://code.jquery.com/jquery-latest.js"
Create and Delete Draggable boxes
Hello, I have been using jQuery UI for a bit for my project at university. I am building a web toolkit using draggable and droppable widgets, however, what has stumped me is how to create and remove dynamic draggable widgets. Could someone give me an insight of how to go about this? I am using #draggable as my id and ui-widget-content as my class for the dynamically created divs that I wish to insert and remove. Thanks, William
Ajaxqueue plugin license?
I'm trying to package some software for Debian which includes jquery.ajaxqueue.js, and I'm checking on licensing conditions. The file begins with: /** * Ajax Queue Plugin * * Homepage: http://jquery.com/plugins/project/ajaxqueue * Documentation: http://docs.jquery.com/AjaxQueue */ /** But the first of those webpages does not exist (perhaps it's something to do with the server crash a few years ago). There is a link to it from the brief discussion on the second webpage. Does anyone know who
how to implement SCORM standard?
I created an application with HTML5 using j Query mobile... I want to make it comply SCORM standard so that it can communicate with any LMS... How to do so? Help me with your answer... Thanks
Is there any wysiwyg editor which can be used for jquery mobile for touch devices
Hi, I need to add a wysiwyg editor in my jquery mobile layout. Is there any good wysiwyg which can be used in jquery mobile layout. Thanks in advanced. Zahid
jquery-1.8.3 undefined error
Hello, I am using jquery in our project. I have added refernce to jquery-1.8.3.js file. I have stored this file locally and referencing it in the project. I am opening jquery dialog on click of some icon. For that I have added the below reference http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"" rel=""stylesheet"" type=""text/css""/>"; <script type=""text/javascript"" src=""http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js""></script>"; I have use the
Script to calculate checksum of array?
In my application i have to calculate the checksum of array using Jquery. Can you provide the jquery code for this. thanks...
Javascript/IE ..... isssseee nooo woorrkkk ... heellp !!!
Hi .. as experienced .NET/WP7 developer, needing to get into mobile stuff. I thought I give JQM a shot. As an MS person (SM ?) , I chose VS2010 and IE9 to develop Javascript. It appears to be unworkable, for a number of reasons, of which the most important: 1. IE keeps caching my programs, so I am unable to work with my latest development. (whatever i tell IE, it still keeps caching) I was thinking of the combination Firefox/ Firebug. Does anybody have any experences/advice to give ???
custom UI element solution using .sortable or .position
Hi Guys, I want to code a 3x segment full screen UI for ipad through HTML. The premise is a main toolbar, a sub toolbar and content panel. Of course the main toolbar actions will change the subs content, and the subs actions whill change the content panel. I have played around with .sortable for a solution and achieved something fairly rough and clunky. Would I be better to do this using .position collision? I'm sure there's a much nicer solution than what I have built and I'm looking for any pointers
Help with jquery validation fileupload
Hi all Masters, I have a FileUpload function in asp.net. Below is my asp.net button. <asp:FileUpload id="FileUpload1" runat="server" Width="150px"/> <asp:Button id="btnUpload" runat="server" Text="Upload" onclick="btnUpload_Click" /> Which I can upload successful. I try with asp validator but no luck. <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please upload your receipt." ControlToValidate="FileUpload1" CssClass="alerttext"></asp:RequiredFieldValidator>
Next Page