postal code is h2b3f4 validations
Hi, I need to check the postal code is h2b3f4 But i worked as h2bfff and so on... For Eg: first three character is below the searchwords and next three character is anything. this is i worked. But now i want first three character is validated form search words and next three character is 3G3 That means Number Letter Number... Please any one help.. to change my below code Below code: function doSubmit(myform){ searchWords = ['h7l', 'h1h', 'h8t' ,'h1g','h1j','h1k','h1m','h1p','h1r','h1s','h1t','h1v','h1w','h1x','h1y','h1z','h2a','h2b','h2c','h2e','h2g','h2h','h2j','h2k','h2n','h2l','h2m','h2p','h2r','h2s','h2t','h2v','h2w','h2x','h2y','h2z','h3a','h3b','h3c','h3e','h3g','h3h','h3j','h3k','h3l','h3m','h3n','h3p','h3r','h3s','h3t','h3v','h3w','h3x','h3y','h3z','h4a','h4b','h4c','h4e','h4g','h4h','h4j','h4k','h4l','h4m','h4p','h4n','h4r','h4s','h4t','h4v','h4w','h4x','h4y','h7m','h7n','h7r','h7p','h7s','h7t','h7v','h7w','h7x','h7y','h8n','h8p','h8r','h8s','h8t','h8y','h8z','h9a','h9b','h9c','h9e','h9g','h9h','h9j','h9k','h9p','h9r','h9s','h9w','h9x','j7t','j7v','j7w','h7g','h7e'];
Decimal value assetion in q-unit
I really hope this wasn't asked before... i really couldn't find anything :S... How do I assert correct decimal value with a bit of tolerance? Lets say I want to assert this: 1 / 3 I don't want to assert this with a long string like this: equal(1 / 3, 0.3333333333333333) I would like to specify tolerance for it like this: equal(1 / 3, 0.33, 0.01) // As in... value can be from 0.32 to 0.34 Is this possible in q-unit? One possible solution to this would be if i multiplied the result by like 1000 and
json-jquery autocomplete
how to import json data from a url into the jquery autocomplete text box...
Help! What's wrong with my code?
I have created a teaching portfolio on Google Sites. I want the menu to be expandable, e.g. when you click on "Courses Taught," the menu will expand so you can see links to various courses pages - as opposed to having to create a whole new page. You can see the example here: https://sites.google.com/site/clareeileencallahan/teaching-portfolio The code I am using below. As you can see, under "Courses Taught" are links two two course descriptions. I was able to find a way to get the menu to collapse,
Working with checkboxes
Hello everyone!!! I am really need your help. I have a list with checkboxes, like: CHK1(main category) --CHK2(sub category) --CHK3(sub category) --CHK4(sub category) How can I do the next things: 1) When I click the CHK1 all sub categories will checked? 2) When I check the sub category, the main category will checked automatic? THANKS.
Loading external content into div withinout iframe
I have a website that has used an iframe for a long time to display external content within my page. As of recently, the external website has enabled x-frame-headers that blocks us from using an iframe. I am trying to find a way to use ajax to request a local page on my server that redirects to the external page and then loads into a div tag. Number one I dont know if this is possible, but the issue I am having thus far is that i cant seem to capture the data of the redirected page. I see
date picker
I am using the date picker function: function Datepicker() { this.debug = false; // Change this to true to start debugging this._curInst = null; // The current instance in use this._keyEvent = false; // If the last event was a key event this._disabledInputs = []; // List of date picker inputs that have been disabled this._datepickerShowing = false; // True if the popup picker is showing , false if not this._inDialog = false; // True if showing within a "dialog", false if not this._mainDivId = 'ui-datepicker-div';
.change(handler); How to create a personallized handler to add to the .change method
Hello to everyone and sorry for my bad english. My problem is the following. I have to use the .change() method for a "select" element: $select = $('#idElement"); $select.change(function() { // Some action });What I want to do is to create a stand-alone function in its own right to insert in .change method. Something like: $jQuery.fn.myFunction() { } $select.change(myFunction); And also I'd like to use the (this) parameter also in myFunction; How can i do this? Thank's in advance!
Success message when error, no success message when successful
I am having problem with success messages. If the form is submitted and there are no problems, I want it to alert Success. If the form is submitted and there are problems, I want it to alert Error occurred. Currently, if I submit something that is posted to MySQL successfully, it gives me no messages. If I submit something that does not meet the requirements within the PHP script it gives me the Success message, not the error message. JQUERY: [code] $(document).ready(function(){ $("#security_add_category").click(function(event){
Navigation in pages with JQuery (hashchange)
So I wrote a little jquery script. The script loads 2 Div's out of one different page, and loads them into the told Div's. You can use it as a navigation script, or just to load Div's from a seperate sheet. The advantage of using this as your Navigation is, that it only loads the needed Div's and not the whole site. That it works you have to look for the namegiving. First you have to give the links a special type of "link", a hash. For example: <a href="#book">Book</a> Because on my site the other
Jquery call wont work after page calls itself
Kind of hard to explain. But with the website here: http://beerportfolio.com/mobile/ the button on the top left opens up the side bar navigation. When a user puts in the login information the page calls itself with this code: <h5>Sign In</h5> <form name=\"input\" action=\"index.php\" method=\"post\"> User Name: <input type=\"text\" name=\"user\" id=\"user\" /> </p> Password: <input type=\"password\" name=\"password\" id=\"password\" /> <div class=\"blank-divider\"></div> <p> <input type=\"submit\"
selector issue
Hi, I am a newby here. I have tried to use jquery statement to change the value of height, it failed many times. Not sure what else I need to do. HTML markup: <div style="height: auto;margin-top:15px;"> <div style="float:left;" class="PRbox"> <div class="tabsButtons"> <div class="PRboxTitle">Press Releases</div> </div> <div style="overflow-y:scroll;overflow-x: hidden;height:330px;"></div> </div> </div> I wanted the selector ".PRbox" as parent to change the value of height for
Adding require.js to jquerymobile template.
If I'm using the CDN files of jquery&jquermobile...how would i implement require.js Any steps or examples would be helpful. thanks. this is from the docs: http://jquerymobile.com/test/docs/pages/backbone-require.html
Conflict between body-wide replace function in toggle function inside the body tag
Hi, I like to realise a multilingual surface of my cms. Therefore I like to use the replace function. The problem is, I use a toggle function which is placed inside the body tag. Both together do not function. How can I solve this problem. I need the toggle function inside the body Tag <body> <div class="switch">switch</div> <div class="show">Text</div> <script type="text/javascript"> $('div.switch').click(function () { $('div.show').toggle(); }); var replaced
Issue in jQuery
Dear JQuery Team, We are currently using jQuery version 1.4.1. We are going to update the latest version of jQuery, but we are getting some issue in jQuery syntax ( selectors ). In jQuery 1.4.1 <input type="text" name="firstName" id="firstName" /> <script> console.log(jQuery("[name=firstName]")); </script> In Above code, I am trying to get input element of first name and its working fine. <input type="text" name="First Name" id="First Name" /> <script> console.log(jQuery("[name=First
Issue in jQuery
Dear JQuery Team, We are currently using jQuery version 1.4.1. We are going to update the latest version of jQuery, but we are getting some issue in jQuery syntax ( selectors ). In jQuery 1.4.1 <input type="text" name="firstName" id="firstName" /> <script> console.log(jQuery("[name=firstName]")); </script> In Above code, I am trying to get input element of first name and its working fine. <input type="text" name="First Name" id="First Name" /> <script> console.log(jQuery("[name=First
Using vmousedown to switch background on a button not working.
I'm trying to toggle the classes on vmousedown and vmouseup. It works ok one time per page div, then it stops working. I've tried $(document).on and delegate, though I'm not sure which element to tie it to. Is there a better way to just change background colors? $( '.logout').live('vmousedown',function(e) { $(this).addClass('ui-bar-c'); } $( '.logout').live('vmouseup',function(e) { $(this).removeClass('ui-bar-c'); }
Can i have multiple views?
Hi, I want to develop a website using PHP MVC and JQuery mobile. My Question is "Can I create different view files for different devices?"
Hiding div onload jquerymobile
Hi, I have a list that I want to hide when the page loads. My problem is that I need to refresh the page to have my ul hidden, because it's not on the first loading. How can I get rid of that ? If needed, here's my code. <script src="/jquerymobile/js/jquery-1.7.1.min.js"></script> <script type="text/javascript">$('#mypage').live('pageinit', function () { $('ul.my-list').hide(); $(".menu-icon").click(function () {$("ul.my-list").toggle();});});</script> <script src="/jquerymobile/js/jquery.mobile-1.1.1.min.js"></script>
JQueryMobile Listview border doubling up
Hi All, For some reason all of my list views whether rendered programatically or just through adding the elements in straight HTML seem to have a double border. It seems as though there is a slight gap which is causing the border bottom and border top to appear as a 2px width border instead of 1px. Any ideas on how to resolve this? Thanks
Tabbed Navigation on website
I created a website that has 5 tabs in it with SQL database interaction. Each tab content has a couple tables, a calendar, etc. In other words, many lines of code. I need some advice on tabbed navigation, should I create one php file with divs for each tab or should I create one php file that has a content div and load each tab content into that div from corresponding php files. For example if I want to click on the tab named Calendar, i load the php file with the Calendar code into the content div,
when to resolve jquery notify
Hi , i am new to jquery deferred , in my code i am using jquery.notify , it goes like this somefunction : function() { $.each(' some variable to loop', funtion() { $.get("some url ") .done(function(color){ deferred.notify(color); }); } return deferred.promise(); } Can any one tell me when to resolve that deferred object
Animate placeholder text, is it possible?
Hi all, Been pondering and trying to get some text that is replaced by another bit of text on hover and was wondering if it is possible to animate the change. $(function() { var placeholdertext = "test"; var Placetext = new Array(); Placetext[0] = "test this"; $("#FALA").hover(function() { $(this).text(Placetext[0]); }, function() { $(this).text(placeholdertext); }); }); I take it this is also the best way to do it?
jquery mobile listview data only display when touch on the screen in Android (Samsung Galaxy Note)
Hi Guys, I encountered an extreme weird problem on Android device where the data in listview will only display when i touch on the screen. I am using jqm 1.2, phonegap 2.1, eclipse juno 4.2.1, and samsung galaxy note. Below are the code: <div data-role="page" id="sent_receipt" data-title="Sent Receipt" data-dom-cache="true"> <div data-role="header" class="header" data-position="fixed" data-tap-toggle="false"> <a id="a_sent_receipt" href="#search_receipt_option" data-icon="arrow-l" class="ui-btn-left"
HTML Form Submit
Hi, I#'m new to Jquery and so i'm not even sure if this is even possible: I want to run a php script when an html form is submitted. The PHP will run a check. If true it will submit the form as usual, if false it will call a javascript alert. This what I have so far: <form id="myform" > <p class="comment">Name</p> <p><input type="text" name="name"></p> <p class="comment">Email</p> <p><input type="text" name="email" value="<? echo $_POST['email']; ?>" size="50"></p> <p><input type="button" onClick="dosubmit()"
How to apply css rules on element, just temporary, and apply them to next element, when they stop to affect previous?
I want jQuery to apply some css to one element, but that css rules should be active only, for example, half of second. And how to make that rules for some element begins exactly when rules for previous stops. Can somebody help me? Thanks in advance.
Problem with latest jquery 1.8.2.js with asp.net 2.0 and IE and Firefox.
Hi, I encountered a problem in 1.8.2 version taken from http://jqueryui.com/draggable/ and the line given in the code therein <script src="http://code.jquery.com/jquery-1.8.2.js"></script> at line var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; due to the nodeName which is not an attribute or property in case of Div used as draggable in asp.net 2.0 and IE8. Also in both case I had to remove toLowerCase() call then only it worked. Did you face this or am I doing something
Jquery lightbox plugin problem.
Hey people, so I need the lightbox plugin to make a gallery on my website, on this page z-gfx.co.cc/page.html. I have tried more than 20 codes to make it work, but it still doesnt work... maybe there is something in my script blocking the jquery but i dont know what... :S So could you please help me? Here is the full code: [code]<!DOCTYPE HTML> <html> <head> <title>Zaboer GFX</title> <meta name="description" content="website description"> <meta name="keywords" content="website keywords, website keywords">
Anyway to make listview right to left?
Hello there, I was wondering if there is anyway to make an unordered list with a count bubble something like this <ul data-role="listview"> <li>Points<span id="points" class="ui-li-count">10</span></li> </ul> i tried modifying the css file making all floats to right instead of left but it didn't work. Thanks in advance
Hide button on "pageshow".
I need to hide a Button on pageshow that's my source: <?php include('inc/header.php'); ?> <script type="text/javascript"> $(document).bind('pageshow', function() { $('#adiar').b('refresh'); }); </script> <body> <div data-role="page" id="jsTestes"> <?php include('cabecalho.php'); ?> <div data-role="content" style="padding: 15px"style="background: url('http://assets.codiqa.com/ps/24291/507dad2f02328271ios_default_bg_tile.jpg') repeat"> <b> <u>Teste:</u> <?php
png 24bit transparency fix
Hi all! I have 24 bit .png images in my web app. They have outglows and shadows which look in android (2.2) and dolphin browser to have edge lines around. I guess it's png banding problem with 24bit png images. Is there any fix for these browsers?(in opera mobile looks like normal).
datatable - which column was clicked
I had the following information on the forum datatable. Now I need to know which column the User clicked, and need to get the value of the first column. <tr> <td>4</td> <td>John Foster 4</td> <td><img entity_id="4" class="image-selector" src='imagens/grid_cancel.png' title='' /></td> </tr> $("#tablex tbody").on("click", "td", function(event){ alert($(this).text()); });
Using floating numbers with jQuery Mobile slider
Hello jQuery Community, I'm currently facing a problem regarding the jQuery Mobile Slider. I modified the Slider a bit. I am using an array with values the slider can take. For example: [220, 250, 500, 900] If you slide to 245 the slider will automatically slide to 250 because it's the nearest value. While this works great with integers I'm having problems with floating numbers. For example if I take this one: var m2 = [19.5, 16.5, 14.5, 15, 10, 13]; my slider behaves in a strange way. When instantiating
jquery wirh datatable - which column was clicked
I have a table, using datatable, and when click the link, I need to know which column was clicked and know the value of first column jQuery $(function() { $("#tablex tbody").on("click", "td", function(event){ alert($(this).text()); }); });
Popup not appearing the 2nd time (1.2 beta)
Hi, I have a problem with the popup in version 1.2.0 beta: The popup itself is inside my index.html: .... <div data-role="page" id="landing"> <div id="popupBasic" class="ui-content" ><a href="#" style="float:right;" onclick="$('#popupBasic').popup('close');">close</a><div id="popupText"></div></div> ... </div> I have different pages which are loaded afterwards and some of them have links which should open the popup: $(".popupOpener").attr("data-position-to","window").attr("data-rel","popup"); $(".popupOpener").attr("href","#popupBasic");
JQM - Text within input not showing
Hello, I'm using jqm 1.2 stable, and i'm having this issue with the input that's showed up on top of a list (the filter input); and with regular <inputs> i use on different forms. On my android i tap them to type some text => the keyboards shows up but when i try to type something the input field doesn't update as I type the characters. Ive another app on this phone i previously developed with 1.1.x series and this issue isn't happening. Is something im doing wrong? or maybe some weird bug? Thanks
jQuery code doesn't run on Firefox but on Chrome it works
Hy, I wrote a simple jQuery code for validate an email address. It works on Chrome unlike Firefox, but javascript is enabled in Firefox. Could you tell me what's wrong? this is the code: $(document).ready(function(){ var email =$("#email"); email.blur(emailIsValid); function emailIsValid() { var email_value = email.val(); var regexp = /^[A-Z]+[a-z]+[a-zA-Z0-9_-]+@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{2,4}$/i; if(email_value.match(regexp)
Call function specific data-role page jquery mobile
Hello, I am trying some things with Jquery mobile. I have a few scripts (javascript) in the header that need to be executed on certain pages. Normally you could use `<body onload="function()">`, but since al the jquery mobile pages are in one HTML page it doens't work. When i try something like this: <body onload="function1()" onload="function2()"> Only the first function works and the second doesn't. I have a data-role page wich has an Id #checklist and the function in the header is called
How to make this canvas automatic ?
Hi everybody, I wondered how to make this canvas working automatically, with an onload. But I don't know how to make it. here are my codes My html codes <div style="display:inline;width:200px;height:200px;"> <canvas height="200px" width="200"></canvas> <input type="number" class="knob" value="1" max="30" min="1" data-fgcolor="#66EE66" data-angleoffset="180" data-width="150" style="width: 104px; height: 66px; position: absolute; vertical-align: middle; margin-top: 66px; margin-left: -152px; border:
loop for images
Good afternoon, I have a mousemove effect and would like some help: I'm passing some parameters fixed, and I would put them dynamic. I need to make a picture that is for each step the mouse, that when searching for the image (sprite) database, according to the parameters already know how to divide the spaces where content will appear the images. The following code: jQuery.noConflict(); function moveImages(IDLoader, numImages) { jQuery(document).ready(function ($) { var cursorObject = { offsetLeft:
Next Page