Disable submit button based on text input conditions
Hi I have a simple website set up, 1 text input and 1 submit button. I have jQuery code in place to make it so, that the submit button is disabled until I have input at least 3 characters in the text input. That works as expected, but I have 2 little problems I have trouble of fixing. Here is the HTML: <input type="text" name="search_text" /> <input type="submit" value="Search" /> Here is the jQuery: <script> $(document).ready(function()
{
$('input[type="submit"]').attr('disabled','disabled');
$('input[type="text"]').keyup(function()
{
if($(this).val().length
Frame for Prototype on Desktop
Hi. This is probably a strange question, but I was wondering if there was a way to put a frame of a phone around the jquerymobile for view on a desktop but when the screen is small enough taking the phone frame away using media queries? I am just making a conceptual prototype for a class and we need to be able to view and critique it within the phone frame on a projector from a desktop so everyone can critique at once, but also see it working on a phone and use the awesome functionality of jquerymobile
Odd popup close behaviour.
So immediately on my startpage i fire off a popup like this: $( '#startpage' ).live( 'pageshow',function() { $("#mypopup").popup("open"); }); Looks nice overlaying the startpage. But when i close it, it doesn´t go back to the page it is overlaying. It goes back one more page exiting my web root. Why is this happening? I´m using the following html code: <body> <div data-role="page" id="startpage"> <div data-role="popup" id="mypopup" data-theme="b" data-overlay-theme="a" data-shadow="false"
$.mobile.ChangePage in 'startpage' pageshow changes startpage?
On my apps startpage (Phonegap/Jquery) i use the following code: $( '#startpage' ).live( 'pageshow',function(event,ui) { if (impoShown === false) { $.mobile.changePage('imp/impo.html',{transition: 'none'}); } }); So when the app starts the impo.html is loaded if impoShown = false. The poblem is that when this page is loaded...i can´t back out of it using android back button. The app closes. Like the startpage (the apps startpage) was never loaded and impo.html is now
JQuery Mobile & Ajax load()
Hi! In my App i load a flip toggle switch via $( "#obj" ).load("index.php?blabla"): into my app. That works fine, but the loaded flip toggle switch looks like a normal <select>-Object. All ajax inserted elements does not look like jquerymobile, How can i change this? Thx
Chrome pc bold alignment
Hi, I wanted to raise the following issue with you. The following code looks fine on most browsers, but the alignment of the text is strange on the latest version of Chrome on a PC. ("Phone" is aligned under "Mr Smith", not under "Name".) It is fine on Chrome on a Mac, and on IE on a PC. <!DOCTYPE HTML> <html> <head> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
ui dialog extension review
Looking for input on this dialog extension... this is one of my first attempts at extending jQuery UI and I am looking for feedback. Am I doing this right? Am I following best practice? Suggestions for improvement? Thanks in advance! http://jsfiddle.net/zachlankton/4UZc7/
Dialog to show when a page first loads?
Is there a way to get a Dialog to show when a page first loads? I would like to ask the user a question when he/she first loads the page. I know how to use a button to show a dialog. i guess i could have the button that is hidden and then use jquery to click it onload but is there a better way? Thanks for your help
Dialog Form with target frame
Hi guys , i' am still not able to resolve my problem. anybody can help on this? i need just to open my dialog form within a specified frame . is this possible ? thanks
Defining own Scrollpath
thats my page: http://www.problemgesicht.de/abendbrot and i want to go vertical to the brown div -> than 5 divs to the right (while scrolling downwards) and than go on vertical to the end. vertical -> horizontal -> vertical ! i thought about http://joelb.me/scrollpath/ or http://johnpolacek.github.com/superscrollorama/ but i cant figure it out....!!! what i want to do is: on a vertical-scrollable page i want to scroll horizontal a few divs and than go on with vertical scroll to the end! is this possible?
validate form element based on other element value
I have a dropdown with an option for 'Other' I would like it to validate the text box (and display an error msg with the rest of the validation) for being empty IF the user selects Other from the dropdown. Also it would be nice if the text box for the Other was hidden until the user selects Other from the dropdown. I am using the usual jquery rules and messages, but i have no idea how to do this. Cheers Darryl
Trouble making multiple ajax requests
Still a javascript and Jquery noob. I'm trying to make multiple ajax requests and I'm going off an example I found that creates two functions returning the ajax requests and then uses .when() method to do some stuff. Here's my code so far, which does nothing as of now. <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script > $(document).ready(function($) { // - 1st link in chain - var url = 'https://www.sciencebase.gov/catalog/items?parentId=504108e5e4b07a90c5ec62d4&max=60&offset=0&format=jsonp';
Referencing the current slide when using jQuery Cycle
Hello. I'm currently using the jQuery Cycle plugin to control a slideshow and am using the 'pause' option and the 'paused' and 'resumed' callbacks. Within the callbacks, how can I reference the currently active slide? I want to fadeIn a child element within the active slide and, when 'resumed' to triggered, fadeOut. $j('.slideshow ul.slides').cycle({ fx: 'fade', speed: 1000, timeout: 5000, pause: true, paused: function(cont, opts, byHover) { $j(?????????).fadeIn(600);
Form from Ajax loaded page
so I have a page that loads content via AJAX. $('#responseForm<?php echo $id; ?>').submit(function(){$('input[type=submit]', this);}); function parseResponse<?php echo $id; ?> () { var hiddenField2<?php echo $id; ?> = $("#hiddenField2<?php echo $id; ?>"); var hiddenField<?php echo $id; ?> = $("#hiddenField<?php echo $id; ?>"); var hiddenField1<?php echo $id; ?> = $("#hiddenField1<?php echo $id; ?>"); var url = "news_parse1.php"; $.post(url,{ hiddenField2: hiddenField2<?php echo $id; ?>.val(),hiddenField:
Superfish open
Hi, I am very new to jQuery so I am sorry for my stupid question. I would be interested if there is a possibility to open up a Superfish drop down menu when a user clicks on a separate html link <a> not situated in the menu but somewhere else on the page. How would I need to do the call so the menu opens up? Many thanks for your help! FLorian
JQuery Selector help
I found the code for doing a selector based on ID, but my circumstance is interesting; and unsure how to go about it. How would I for example, hide a div that doesnt have an id, but does have extra attributes for style ie. z-index 100000; ? This one is causing some headache trying to get the selector right.
Jquery load not working
i have a button that calls a js/jq function when clicked: the button: '<input type="button" value="Up Vote" onclick="changevote(true,'.$_GET['itemid'].','.$reviewid.');">'; the js/jq: function changevote(bool, itemid, reviewid){ $(this).load("changeVote.php", "bool="+bool+"&itemid="+itemid+"&reviewid="+reviewid,function(){}); } and finally changeVote.php that should be called: <? $ReviewGroup = new ReviewGroup($_GET['itemid']); $list = $ReviewGroup->getReviews(); //get the list of approved reviews
Use of ui-link-inherit class
What is the purpose and use of the ui-link-inherit class? I realize it's for internal use of buttons and lists, but it would help understanding what's going on in more detail.
Toggle - horizontal - html4
Hey, unfortunately, I have to use html 4 were I work. This code works in Chrome but not in IE (doctype html 4). Could I do something for this toggle work with this doctype? (as your mouse pass over the element open right to left) Código: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <head> <title>Untitled Document</title> <script language="javascript" src="jquery-1.5.1.mim.js"></script> <script> jQuery(function($) { $(document).ready(function() { $('.panelHandle').hover(function()
JQuery ajax delete request
I have a rest service which does a DELETE. I am able to successfully invoke this rest service through curl. The command which I used was; curl --request DELETE http://localhost:7080/airavata-rest-services/registry/api/descriptors/hostdescriptor/delete?hostName=tempI have a Jquery client which tries to do the above but I don't see the hostName param in the request. Am I missing anything in the way in which I create the request? var hostName = $("#hostName1").val(); var deleteUrl =
extending jQuery.expr.filter.CLASS
Hi! We use the HTML class attribute to give the JS access to parameters. For example a class="cssclass jsclass(a=b;b=c) cssclass2" can be read by a script using something like $("element").filter(".jsclass").getParameters(). To achieve this we extended jQuery.expr.filter.CLASS to match classname( too. That worked fine in 1.4.x and with a slight modification it works in 1.8.x too. But when I override the default behavior of jQuery.expr.filter.CLASS, I loose the classCache because it is a local variable.
How To Select Specific Data (TD) from Rows
I need to select all of the languages from the following table using jQuery. The output should be Java, Ruby, Smalltalk, C++. What statement would I used. Thanks <table id="languages" border="0" cellspacing="1">
<thead>
<tr>
<th>Language</th>
<th>Type</th>
<th>Invented</th>
</tr>
</thead>
<tbody>
<tr>
<td>Java</td>
<td>Static</td>
<td>1995</td>
</tr>
<tr>
<td>Ruby</td>
<td>Dynamic</td>
<td>1993</td>
</tr>
loadPage not working
what i'm trying to do is just load a content from another file to a div, just like $.ajax using normal jquery. in my main page: <div data-role="page"> <button id="load" style="border: solid blue;">Click here to load</button> <div data-role="content" id="target"> <!-- ajax load here --> </div> </div> this is the html from another file: <div id="secondPage" style="border:solid red;"> <p>test</p> </div> and finally, the js: $("body").on("click", "#load", function () { $.mobile.loadPage("mobile/favorites",
Loading alternate page header including menus based on screen size
Help! I am new to jquery. The first part of my page is my header and a menu. I have one menu that I want loaded when the code is loaded via cellphone and a different one when on any other media. This script loads my header but then the script just keeps running until the browser times out. None of the rest of my code loads. <head> <script src="jquery/jquery-1.8.3.min.js"></script> </head> <body> <div id="layout"> <script > if (screen.size < 321) { $('#layout').load('includes/navbar-cellphone.html');
How to pass content of <a> tag on form submit.
Hi Guys, I have many <a> tag like buttons with content date inside the form, when I do post how I will get the data who stored on the <a> tag? Example: <form id="formOs" action="jsOS.php" method="post" rel="external"> <a style="height:60px; line-height: 40px;" href="#" id="diaSelecionado" data-role="button" data-inline="false"> 19/11/2012 </a> </form>
play audio on hover div not working
hello. i cant get the sound to play when i click on the div. any ideas? <div id="videoHolder"> <audio preload="auto"> <source src="assets/audio/beep.mp3" type="audio/mpeg" ></source> <source src="assets/audio/beep.ogg" type="audio/ogg" ></source> </audio> </div> $(function(){ $('#videoHolder').click(function() { $("#audio")[0].play(); }); }); thanks ricky
How to add count down time in specific pages using jquery?
I want to add count down time in some pages using jquery, which function will work?
Looking for search function
Hello everyone, I am looking for a jquery search function, updating a result list every time the user sets or changes a filter (checkbox, radio, text). A good example of the complete search function is: http://www.carwale.com/new/search.aspx#fuel=2&bs=3&fuel=1 As I am quite new to jquery use (however, I got some general programming experience) I would be greatful for any hints, clues or even a walkthrough / tutorial / guide, to build such a search function. One hint I yet found is "auto postback",
Dialog Form with target frame
Hi Guys , i'am lilt bit stuck here .. i want to open a dialog form on button click ..the issue is it is not opening in the right frame and it is located in the top frame menu frame. How van i do that? i want to open that dialog in a frame called "frame_content" below is my code : thanks $( "#create-user" ) .button() .click(function() { $( "#dialog1-form" ).dialog( "open" ); });
Problems with mobile phone orientation!
Hi guys, I need some help with developing my portfolio website. I'm working with media queries to make my website responsive to different devices and have come unstuck with a jquery plugin that I have used. For the navigation, i've used magicline but when the website is viewed on a mobile device, the positioning of the line goes all over the place. EXAMPLE: If you go to http://www.baztesting.co.nf/wordpress/contact on a mobile device, and view the website in landscape orientation (refresh the page
jquery .each progress bar
Hello, I'm processing data on site using .each, everything works fine, but I'd like to make something like progress bar, because there is quite much data and it takes maybe 2 or 3 seconds, so I'd like to show user some progress bar. I have idea, how I would like to do that, but there is one problem. I have a div which is hidden by default and shows only when this processing is in progress, so i have something like $('#divid').show(); $('.processdata').each(function() { // processing }); $('#divid').hide();
Simple Javascript problem
I am new to javascript and have a problem. I am trying to get a hash and pass the tag to a url but I am getting undefined as a result. I am sure it is a simple markup issue but can't for the life of me figure it out. Thanks in advance $("#nest-tabs li a").click(function() { //alert("On the top nav:..."+(this).hash+" was clicked!"); var hashStr = location.hash.replace("#",""); $.post('form.php?toptab='+(this).hashStr+'', function(html) { $('#result').html(html); }); });
jquery cookbook example.
Hi, I study jquery using jquery cookbook by o'reilly. I tried to use this example in book: alert('Page contains ' + jQuery(document.getElementsByTagName('a')).length + ' <a> Elements, And has a ' + jQuery(document.body).attr('bgcolor') + ' background'); but jQuery(document.body).attr('bgcolor') returns allways undefined. Can somebody explain to me why? thanks.
jQuery validation: display the focused field error message
Objective: I'd like to display the focused field error message in a container. What I've done so far: <!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> label {display:inline-block; width:60px;} </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){
How to check if an input-array element is filled?
Hi everyone, I've been puzzled for a while now on the following: I have an inputform with several inputs, all carrying the name 'participant_surname[]'. I would like to check if one of those elements is filled or not and take appropriate action. However, only the first element works wonders, but any other changed inputfield is not detected. How should I solve this? Any help is much appreciated! This is currently the Jquery script: $("input[name^='participant_surname[]']").keyup(function() {
Ajax POST Cookie Not Set
I am trying to perform a POST operation to a page within the same domain that I set my Cookie in. My GET operations populate the Cookie just fine. When I POST the Cookie is not set. I have even tried to set the Cookie header on Before Send but I get a warning saying it is protect or not safe or something. I still think the POST request should send the Cookie data: $.ajax({ type: 'POST', url: "include/page/admin/post.new.php", data: { var1: "abc", var2: "abc" }, success:
Load another page with DOM changing
I'm trying to load from initial.html different html page with: $("#hidden_demo_div").load("modules/another.html", function (data) { var value = $(data).filter("#demo_div"); var html = value.html(); // THERE IS NO <strong>Hello</strong> here!!! } (The "#hidden_demo_div" is at the initial.html (HTML where JS code with .load is linked). This element is declared at the BODY) here a snippet from another.html <html> ......................... <head> <script type="text/javascript"> $(document).ready(function()
converting windows .exe to app. run program.
hi all im new here and dont want to wast everybodys time. i have a program that i use to tune my bike . the program is a windows run program , i cannot find it in app. form anyplace is this the place to do it?????? thanks harle.
$.plot is not working in ASP.NET on JSON return(maybe it is string)
Hello Everyone, For god sake I have been working for this since last 3 days. I am using ASP.NET webforms for flot charts I connected to database in test.aspx.cs file using [Webmethod] where I can return json. I stored the return value both in textarea and $.plot(placeholder, [and also here], options) It does not print the graph in placeholder however when I do: var data = past the value of textarea here and run applicationn it prints to me the value can anyone help me please: ---------------------------------------------------------
jquery scroll down with change letter spacing
i want to animate text with scroll down. i apply this code.this is working. but scrolled<400 not stop.code is running.how to fixed this issue, Thank You ..... $(function(){ $(window).scroll(function() { var scrolled=-($(window).scrollTop())/50; $('#scrolled').text('scrolled: '+scrolled+'px'); if(scrolled<400){ $('#cName').css({'letter-spacing':12+scrolled+'px'}); } else{$('#cName').css({'color':'red'});} }); });
Next Page