change button color depending on text value, how??
I want to do the following (air code): $('input[type=submit]').val('Update') then set submit button color=red actual generated html looks like: <input class="btn btn-primary" value="Update" type="submit"> <input name="products_id[]" value="1" type="hidden"> if an anchor link has a span class containing 'btn' and its text value is 'Check Out' then set color=purple such as $("span:contains('Check Out')").css("color", "purple"); (adapted from jQuery docs, this tests if span contains that phrase??) actual
jquery carousal image loading
i trying to make Images appear in all sliders but so far what ever i tried its not worked for me.how to make the images appear in all the sliders this is my <img src="http://www.bmhs.org/sites/default/files/styles/article-large/public/news_article/add/image/Carousel.jpg" data-lazyload="" width="500" height="187" alt="1" title="AppleMagazine" class="cover lazy" style="background-color: black;" /> providing fiddle link below Link 1 Link 2
Listview with phone number
Let me try this again. Below is the code from one of my files that contain names and phone numbers. I have a page with links that point to the different files with names and phone numbers. When you first go to the page, the name and phone number are in one line and they are just regular list items. If you refresh, it now becomes a link to the phone number. There are no anchor tags so I guess Jquery Mobile is seeing the phone number and turning it into a link. Not sure it doesn't do this when you
$.each/if comparison iteration problem
Im trying to iterate through an ajax response. Im receiving a json response with several rows of data. yadayadayada ... { "PDMOVE":[ {"SCCUST":"AAM440", "SCNAME":"A AMERICAN STORAGE", "SCADR1":"4400 MCGRATH", "SCCITY":"VENTURA", "SCSTAT":"CA", "SCZIPC":"", "SCCNTR":"3"} , {"SCCUST":"ABH952", "SCNAME":"A&B HONGDA GROUP INC.", "SCADR1":"9520 SANTA ANITA AVE", "SCCITY":"RANCHO CUCAMONGA", "SCSTAT":"CA", "SCZIPC":"91730", "SCCNTR":"2"} , ... ... ... The json is valid, it's been tested ... I want to
Slider handle
I've been lookign at the jquery ui slider control - its ok but does have some limitations. Perhaps the most annoying thing is that the handle now always protrudes out from either side of the slider track, with no option to change it. Its awkward for users in a lot of cases because the end of the track isnt where they think it is. Are there any other good sliders that are worth a look at?
Tap event fires twice on iPad/iPhone
Hi, I've problems with an alert inside a tap event - it works on desktop/winPhone but not on iOS where the event fires again next time you click on something... http://jsfiddle.net/nMR85/565/ Is it me doing something wrong or a bug?
using jquery with xhr
Hi, Forgive me in advance for my bad english. I'm trying to put the jquery accordion in some pages of my web application, and I have a problem to use this accordion. I'm loading my pages using xhr in a div called "page" (<div id="page">). If I get this page directly, the accordion function, but if I load it from xhr, it doesn't work. how can I resolve this problem ? i'm using smarty for the template generator. I hope that someone could help me.
.append-Problems
OK, so I want to add the elements with class "selected" to a div with class "zusammenfassung". This code works: $(".abschicken").click(function() { $("#ServicePortal ul li").each(function(){ if ($(this).hasClass("selected")) { $('.zusammenfassung').append(this); } }); }); except, it deletes the original divs with the class "selected". Is this normal with the append-function? And what can I do about it? Thanks for any help.
hover() trigger behavior in Internet Explorer 10
Hi, I'm pretty new at jQuery/javascript so please excuse if this is really stupid ... I'm trying to code a mouseover behaviour on a website where when the mouse enters an image, an overlay of text appears above the image, and persists until the mouse leaves the image. To achieve this, I've marked up a mouse catchment div that covers the entire image, and is greater in the stack order such that it is above both the image div and the overlay text div. Then, I've used the following to code the behavior
Designing a Modal
I am designing a modal and I am having issues with controlling click events. Let me first show a framework of my HTML code so I can better explain the problem <div class='modal-wrapper'> <div class='modal-whole'> <div class='modal-header'> <h1></h1> </div> <div class='modal-body'> <p></p> </div> <div class='modal-footer'> <a href="#">Close</a>
the contains function doesnt work for me please help!!!
so i been going at it for hours can you tell me where im messing up, im starting to think that the way im doing it its not supported by jquery no more this tutorials are from a year ago index.php <!doctype html> <html lang="eng"> <head> <meta charset="utf-8"> <title>wassup</title> <link rel="stylesheet" type="text/css" href="cs/style.css"> </head> <body> <p><input id="searchme" type="text" /></p> <ul id="caca"> <li>hey you</li> <li>fyck no</li> <li>poikl mn</li> <li>heiisds sdfafd</li>
BackgroundImage URL
Hi All, On my draggable stop event I want to get the positions (top and left) and the background image url of my div container which is being dragged. I can get the co-ordinates but not the url, any help please? Jiggy!
Possible bug: async issue with link when moving back?
I'm having a hard time figuring out how to explain my issue. I have a form which have a couple of input-fields that are validated on blur. For example, I have a address field which has a max value of 45 chars. If I write more than 45 chars in the input box and then move to the next field a dialog is shown proclaiming that I’ve been a silly person for writing so many chars*. When I click on the OK button in the dialog the dialog is closed and I can try again. BUT if I write 46 chars in the field and
Jquery does not work?
here i write jquery in my asp.net forum but not working please suggest where is i'm wrong? <script type="text/javascript"> $(document).ready(function() { $('#ddlPaymentMethod').change(function(){ if($('#ddlPaymentMethod').val() == "") { $('#ddlService').prop("disabled", true); } else { $('#ddlService').prop("disabled", false); } }); $("#ddlService").change(function(){ if($('#ddlService').val() == "")
Customizing of Flip Switch in Listview (PhoneGap)
Hi to everyone, i'm developing a mobile app based on PhoneGap and have some problems regarding Settings page. I added some Flip Switches into my settings page (Listview), but they are looking not like in real size (jammed). Without Listview Flip Switches are looking normal, but I want to include them into Listview and make settings page more amazing. Have look at the image bottom for the details. <ul data-role="listview"> <li> <h3>Sound</h3> <p>Sound during the pop-ups.</p>
load("post.php") reloads the data twice
Hi i m using the insert code in post.php file and i m refreshing the div automatic using the below code: <script> $(document).ready(function() { var b=$("#id1").val(); var d=$("#id2").val(); var refreshId = setInterval(function() { if(d=="") $("#demo").load("posts.php?id="+b); else $("#demo").load("friendspost.php?friendid="+d+"&id="+b); }, 75000); $.ajaxSetup({ cache: false }); </script> I have a problem that when div refreshes, it again loads the previous action done Mean When i post something
URL path to set class in A element using Jquery based on pathname
Ok.. I'm trying to get a dual layers navigation to work.. everything is cool but the jquery that sets the class "current" to the right A element according to what the URL is. But not even the alert is working, and I'm not sure why.. new to jquery.. as it currently is: http://gulfinsight.obmon.com the html: <div id="nav_container"> <ul id="top_nav"></li><li><a class="home" href="/home/all">HOME</a></li><li><a class="the-gcc" href="/the-gcc/all">THE GCC</a></li><li><a class="arts-and-culture"
How to format a gridview
Hello! I am adapting my asp.net web app to use jquery library, and everything is very easy and with a great result, but in one of the pages I need to show a gridview with some information, the gridis bigger than the device's screen so the grid is cut and I can't see it's whole content. I don't know what solution is the ebst for my problem, perhaps enablig horizontal scroll, but I don't know how, or perhaps creating a list with interactive rows, but I don't know how to do it either. I hope somebody
jquery works but this method doesnt.??
i was watching some tutorials from thenewboston on jquery and everything works on my notepadd++ and xampp server, the only thing is that this code right here doesnt work it is this video (3mins) that i cant do, it doesnt highlight the text like it shoud. im tired of rechecking for the last two hours,,i thought maybe the syntax is bad and someone here can help me https://www.youtube.com/watch?v=jIZFHjkUCrs&list=EC6B08BAA57B5C7810&index=24 $(document).ready(function() { @@@when document ready $('#searchme').keyup(function()
Binding a plugin init to dynamically generated HTML
Hi All, I'm using the excellent roundabout carousel plugin (http://fredhq.com/projects/roundabout/) which works great until I dynamically create the ul's I want to use; My code is; $(document).ready(function() { $('.footer3col_full').append('<ul>Test</ul><ul>Test 2</ul><ul>Test 3</ul>'); $('ul').roundabout({}); }); I have tried a number of ways to bind the plugin's init using .on() and .bind(), but nothing seems to work, all I get is standard bullet points;
JQuery and ODATA web service
Hi! I have created a ODATA web service to get some data. It looks like this: namespace AdvaniaUtvService { // Start the service and browse to http://<machine_name>:<port>/Service1/help to view the service's generated help page // NOTE: By default, a new instance of the service is created for each call; change the InstanceContextMode to Single if you want // a single instance of the service to process all calls. [ServiceContract] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
an AJAX returned function?
What I am trying to do with $id is get it returned from the clicked table row event function, grab the id and pass it to the delete.php page through AJAX GET in the url. I don't know if I can have the click event function inside the AJAX function like this? $.ajax( { var $id= $('.x').on( 'click', 'tr', function (e) { var id= $( this ).closest( 'tr' ).get(tr[id]); $(this).closest('tr').remove(); return id;} type:"GET",
$.each() not saving values
It's not often I ask a question myself! Please could someone sanity check my code before I report it as a bug. Is this a bug? I'm trying to alter the values of a custom object's properties, from within a $.each() loop. The full demo code is on jsfiddle:- http://jsfiddle.net/alano/96XDz/ var obj = { testA: "please change this", testB: "and change this too" }; function doReplace() { $.each(obj, function (index, value) { var newVal = value.replace("change", "done");
Annoying Flickerings in Transitions
Hi, I have made two apps for the iphone with phonegap and jQM. Both of them are developed completely independent from each other and do completely different things. I've tested every single transition for the changePage event but the Flickering is the same every time. for Example: if I click on a Button for the next page I can see the next page for some milliseconds and then the transition starts and flickers. for testing pourposes I have made 4 simple jQM pages with 100, 1000, 10000 and 100000
open page
Dear All Using PHP A record is displayed. and same can be deleted using JQUERY But after deleting the record i want to show next record JQUERY code to check whether a record is deleted $("#deleterecordy").click(function () { $('#searchdiv').hide(); $('#headerdiv').hide(1000); $('#selectheaderdiv').hide(1000); $('#showdetails').hide(1000); var url = "deleterecord.php" var data = { recordid:$('#recordid').val() }; $('#deleterecorddiv').load(url,data,function(data){
Fixed footer on iOS 6
Hi, After upgrading to iOS 6 we started having the issue in our application. We have long forms where user enters data. When the field that user focuses is pretty close to the end of the page, when the keyboard is shown the footer jumps up and, when we start typing something it either disappears totally or jumps to the middle of the screen. When we hit done the footer is repositioned back to the bottom of the screen. NOTE: it is important that this happens only at the moment we start typing, not
jQuery Mobile activating geolocation on mobile devices
Hi, a very strange thing appears when visiting sites/apps using jQuery Mobile with an iPhone4S (iOS6.0.1). The geolocation seems to be automatically activated, shown by the GPS-arrow in the status bar - which drains the battery pretty fast. Tested with jQuery Mobile 1.1 and 1.2, and also reproducable on the demo website http://jquerymobile.com/demos/1.2.0/ I can't find any relevant functions in the code - what can cause this behaviour? (It does NOT happen on http://jquerymobile.com/demos/1.0.1/ )
height and width method doesn't work when jquery library located in head section??
Hello guy! I'm new in jquery and i have a small test with height and width method in jquery I use the seperate file to execute my code to get height and width of element. but when i call it in body and jquery library in head section. So height and width method doesn't work at all. I don't know why but when i locate jquery library in body section (the same place with my file) . It worked fine!! Below is my code Html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Add a summary in doc
Hi guys, It could be a great thing, in documentation pages like this one http://jquerymobile.com/demos/1.2.0/docs/api/methods.html , if there is a summary of main topics. Currently, you have to scrolled all the page to find one method you're searching for. If you're lucky, you find it at first place. But it works once... Thanks for your work. Hoping my idea will help somebody somewhere ************************************************************************* jQuery, jQuery UI, jQuery Mobile and QUnit
jQuery Mobile Download Builder
Anyone know what is the latest on the – Alpha Release of download builder. When can we expect a stable version. thanks,
Giving away 2 free copies of jQuery Mobile Cookbook
Hi all, Just wanted to share the good news, my book "jQuery Mobile Cookbook" by Packt Publishers just got published at http://www.packtpub.com/jquery-mobile-cookbook/book .. would be glad to receive your feedback and suggestions at chetankjain@gmail.com Check out this link to win your free ebook: Giving away 2 free copies of jQuery Mobile Cookbook
jquerymobile 1.2 google map full screen problem
Hello, i use google maps in jquerymobile. after upgrade to jqm 1.2 , maps not shown in full screen.(in mobile & desktop browsers). But when i resize browser window, it turns into full screen(that i want at first screen opened). i search problem in internet and try most of them but none of them helpful for me. What is you suggestions? <!-- Map <<< --> <div data-role="page" id="map" data-add-back-btn="true" data-fullscreen="true" style="width:100%; height:100%;"> <div data-role="header" data-position="fixed">
Adding up Values
Hi, I'm new to jquery and was wondering if anyone could advise me on how to proceed. I would like to give a value to an image. When a use selects the image and depending on how many images the user selects they will get added up and the total will be shown on the screen. Can anyone give me any ideas on starting this. Thank you for your time.
Hover's gone wild!
Hello everyone! Im trying to build a website using joomla 2.5 with "joomspirit35" free template which came with uvumi dropdown menu plugin ( http://uvumitools.com ). I had to use custom images for the main menu. Unfortunately when I finished I realised that the dropdown drops down even the mouse is under the menu (instead on top of it). I guess that happens because the <ul> that holds the submenus somehow triggers the menu. Im not sure if it is css or jquery issue but I'd really appreciate the help...!
jQuery AJAX doesn't return XML with Internet Explorer 10
When called from within Internet Explorer 10, jQuery doesn't return a valid XML document object. What's going wrong? Here's the test code: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> <script type="text/javascript"> var url = "test.xml" $(function () { $.get(encodeURI(url), function (data) { data.setProperty("SelectionLanguage",
can i insrt table in the grid layout...
hi .... can i insert table in the grid layout ... can any one help with example....
$("..").empty().append("#..") only works on the first click.
Hi, I am writing a jQuery Mobile application. I have a simple jQuery script which empties a div then append a new content to that div. What happens when the event is initiated (click event), it works the first time. All subsequent clicks only empties the div but do not append the new content. Here is the jsFiddle if you wish to take a look: http://jsfiddle.net/Z7YCx/ Any help/advise is highly appreciated. Thanks.
Load Event issue for dynamically added elements
I am trying to support load event for dynamically added elements to the DOM. so couple of years ago we used to use $(".myclass").livequery(function(){ }); and it used to work perfectly. Now $(".myclass").on("load",function(){}); // doesn't work apparently load event is not supported for .on() and .off(). what is the work around this issue, so simply add elements to the DOM, or even when the element is constructed for example ( $("<div class='myclass' />") ) an event gets fired and we catch it. is
Drag Drop Create New Object
Hi All, I know how to do the drag and drop. My problem is if I look in code behind I can't see any of the drop controls. I want to drag and drop blob images (pointers) on to a photo so I can put text to each blob. Blob 1 - This is the sun in the photo etc. Please any help, I have been googling for 5 days now but can't grasp how to do it. I also want to save the position of each dropped blob in database so I can recall them. I am very new to JQuery and Java so would appreciated any replies,
jQuery UI Datepicker initial display: none; fixup
Hi Guys! I found a very minor, but very annoying problem about the Datepicker widget. On the first instance's init, when a new div instantiates with a lot of classes, it's initially "visible" and have some padding (so, if there is a site, with a huge "wrapper" class with a background-image in it, and the page has a different body background, it might start to mess with the page design) Once you bring up the calendar, and after click away, on blur this "bug" will disappear by getting a "display: none;"
Next Page