success block is not getting executed
The website that I have worked on has a requirement to reload the page based on the city selected from the drop down. I have implemented the functionality but for some reason, the success block is not getting executed and due to this the page url is appended with '/undefined'. The issue pages of the web page is below http://www.localcloudstore.com/ this is the home page and http://www.localcloudstore.com/Bangalore/category/restaurants this is a inner page. There is a different search section for
jQuery validation rules: selectively validate rule
I have a form where I can set the rules as required true/false depending on which button was clicked (insert or update). If all I'm using is "required" it works great. Is there a way to add other validation rules only if the field is required? Let me show you what I have so it can make more sense. I added a "number" rule that only needs to apply if required=true. The problem is that the both "number" rules trigger, even when only one of them is supposed to. I've pasted my current iteration, but
Question on dynamic pages
I have 2 questions, I am writing a webpage that has all its pages created dynamically. I have 2 issues that I am not able to find an answer. http://jsfiddle.net/A8B2F/3/ 1. when the page loads, JQM seems to inject a generic empty page (this is what I get in the jsfiddle example <div data-role="page" data-url="/_display/"> </div>) by the time document ready event is fired where I would insert the first page. Is there an event or hook that I can subscribe to so that I can insert my first page content
How to use a increment to show in a json string
I need to text the return of a json file and would like to know how I increment a variable like i++ inside a json string so that to display it on the screen. So, in my json test that I receive two line per time, I would be able to see: Name Increment X 1 Y 2 It sends the same two lines again and I should have: Name Increment X 1 Y 2 X 3 Y 4
Datepicker Input Text Field Issue 1
Datepicker Input Text Field Issue 1: Note : This post is similar to one I had posted 11 days ago, but it differs slightly due to requirement changes and as a result messed with the behavior. I am having trouble with the JQuery datepicker control, because it’s triggered off of a text input field. Important Note: User needs the ability to manually enter the date. Technologies used in this issue: · ASP.NET using the 3.5 .NET Framework · C# · jQuery JavaScript Library v1.10.2
Auto complete/dropdown performance
I am using (http://jqueryui.com/autocomplete/#combobox). It is working for smaller data but it is not working if the select contains more than 1000 options. especially it is not responding if we click in show all button. Please help me on this. Thanks in advance. -- Krishna Kishore
New to jQuery. Having a recursion issue.
Alright, I'm fairly new to jQuery, and what I'm asking for may not even be possible. I have a very small XML file that looks like this: <?xml version="1.0" encoding="utf-8" ?> <BookList> <Book> <Title>Book One</Title> <Publisher>Just A Test</Publisher> </Book> <Book> <Title>Book Two</Title> <Publisher>Some Other Book</Publisher> </Book> </BookList> Just something simple, as proof of concept. And this is the jQuery I'm using. <!DOCTYPE> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
Data disappearing when moving tabs. Is local storage the solution?
Hi, I have a list that I retrieve using json format and display them on the page. However, when I click on other tabs and come back, it hasn't be kept. Is local storage the best solution for that? Thanks.
Is there a way to overlay an image on a jqPlot line chart?
Is there a way to overlay an image on a jqPlot line chart? I'm trying to figure out if it's done in the jqPlot framework... or lower level. https://groups.google.com/forum/#!forum/jqplot-users http://forum.primefaces.org/viewtopic.php?f=3&t=39048 Thanks, -- Robert
Inserting widget Themeroller into Dreamweaver CS6
Hello, I have tried for ages reading the forums and "getting started" page but nowhere can I find simple step by step instructions on how to insert the new awesome themeroller widgets .zip into my dreamweaver CS6 site. I've tried various different methods but I cant get it to work at all. Before in DW I would install widgets (like the jQuery tabs widget from 2012) into the "install widget browser" and upload the .zip file from there, but DW has disabled this in an update to try & force people to
jquery autocomplete combobox not rendering in Compatibility moed, IE8 and below
I have created a jquery autocomplete combobox, FiddleDemo. It works with IE 9 and IE10, but not in IE 8 and below. Can anyone help me out please. I have added the following that do not help either <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1" />
jQuery Mobile + Cordova app
Hi all, I am developing an app using cordova and jQM 1.3.2, I have my project structured in a way like the attached pic. Calling whichever pages required inside the app, but there seems to be a lag during every navigation, a couple of blinks when I navigate to a new page. I researched on web to know how others develop cordova app using jQM, some put all pages content inside index and call using id, and there are few who does like in the pic, I want to know best possible method. Please advice!!
Datepicker - iterating through each date
Hi all, I have an application which replicates the dates in the datepicker in a separate table and adds additional data to each td's contents. I am trying to iterate through each cell in the datepicker and can get the following: $(".ui-datepicker-calendar tbody td").each(function(index) but how would I get the first date displayed in the calendar? For instance, the first date displayed in January 2013 is Sunday Dec 30, 2012. Once I have the first date I assume I can iterate through and create the
How can I use ranges in a switch case statement using JavaScript?
i try to user switch (range of number) but it seems not work? can you help me check it where is the problem? http://jsfiddle.net/hukuto7750/beu7q/ thanks
Error: Unexpected call to method or property access.
Error: Unexpected call to method or property access. I was getting the above error in IE8. Because of this i am unable to load my angularjs template. looking for solution..............
Javascript to format Arduino code
I will be upfront about this: I have asked this question on several other forums but have had no usefull replies so I thought that I would try here where you specialise in javascript and jquery.I am trying to implement some keyword colour formatting used in Arduino micro controller code. I used Javascript’s to apply the relevant classes to the keywords but as you can see here http://jsfiddle.net/5xuER/embedded/result/ the scripts obviously enough changed the text colour of all of the full or partial
Tooltip with bold text
Hello folks, First time to post here. Greetings everyone! I'm trying to get a bold text in the tooltip I have an html something like this ...<td><div title="<b>Dude:</b>Amits">Fonz</div></td>... In my script I can't seem to get the document to work so instead I did something like this $("#thetable table tr td div").tooltip({ //items: "[title]", //content: function () { // //return $(this).attr('title'); // return "<b>That's what this widget is</b>"; //}
Adding a page to the DOM on the fly accessing data-values.
Hi, if I add a page to JQM to the DOM on the fly with append how would I access the data-attribute? I have inserted a page titled - new_dates that in the head has a data-value of 26, but how would I get it as the way I have tried, $('#new_dates').attr('data-value') displays as undefined. Thanks,
How to fire event on future dom elements
I cant get my function to fire on elements that are added to dom after domready Im trying to remove an input box if it's cleared out by backspace or however $(".CC").on("keydown", ".CC", function(){ var $this = $(this).val(); console.log($this); if ($this == "") { var $id = $(this).attr("id"); $("#" + $id).remove(); }
Function Call
function show() { var offset = $("#child").offset(); var posY = offset.top - $(window).scrollTop(); var posX = offset.left - $(window).scrollLeft(); $("#output").html("top:" + posY + ", left:" + posX); } show(); $(window).scroll(show); Well I understand that $(window).scroll(show); means that execute the code when the window starts scrolling , but than why is that thing show(); In the code , i don't get its relevance , what is it really doing ?
.off() trouble
I'm having trouble with the .off() method: $(document).on("click", ".npc", function(){ $("#body").append("<h3>Blah</h3>"); $(this).off("click"); });I'm trying to unbind the click event from .npc class after it's been clicked on, but it continually appends to body. I've also tried this: $(".npc").on("click", function(){ $("#body").append("<h3>Blah</h3>"); $(this).off("click"); });In this case it's not appending at all. Maybe because the .npc class doesn't exist initially on page load?
Cannot use data- as an object property?
Hi. Is it not possible to do this? var obj = { data-id : "hello" }; I get unexpected token '-'
Getting data from a SQL Server DB and accessing it in Jquery Library (not code on default aspx)
Hello, I'm quite new to jquery and I was wondering how to do the following: Just to give an idea, what I'm trying to achieve is getting a list of holiday dates from a Database and disable them in a jquery datepicker. 1 - Need to get data from SQL Server DB (this can be done Server Side one time). I already have the Stored Procedure to return the data and its basically 2 columns, 1st column INT , 2nd column STRING. 2 - My real problem now is I want to pass this data to a jquery file that
How to change color of collapsible ?
Hi everyone, I want to use my color for collapsible (heading and content) on jquery mobile 1.4.3 This version only support 2 color: data-theme="a" -> grey data-theme="b" -> black I dont know where I can edit it I hope your helping Thank you so much!
Issue with dialog on ajax data
I am having trouble getting the dialog function to work with data that is imported from ajax/json. Is there a known issue, or additional measures required to make the two work together? here is my question on the stack exchange to give better insight: http://stackoverflow.com/questions/24890733/jquery-dialog-of-table-data-from-ajax-not-showing?noredirect=1#comment38664643_24890733 Thank you in advance
Documentation bug in parent()?
I noticed the following in the documentation for parent() at http://api.jquery.com/parent/ Given a jQuery object that represents a set of DOM elements, the .parent() method allows us to search through the parents of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .parents() and .parent() methods are similar, except that the latter only travels a single level up the DOM tree. It seems that the first sentence is actually describing the parents()
How to add response delay for mouseenter without using setTimeout or hoverIntent plugin..?
$(".plus").mouseenter(function(){ var $header = []; $('.headerCls').each(function() { $header.push($(this).html()); });
Free the cookie plugin and Google Analytics
I am trying to use the free the cookie plugin but am not sure how to use it fully with Google Analytics. I have got the banner appearing and it disappears as expected when clicking on the allow button. My problem is that I don't understand how or where to put the Google Analytics code into the OnConsent option. Can anybody help me by supplying the code needed that I just need to then add the Google Analytics code to? Any help would be greatly appreciated.
listview show/hide toggle
Hi there.. I have a jquerymobile document which include listview & search box and I was hoping to add a toggle button to either show or hide the listview so either search box and list (on status) or search box only (off status) apology is this question have been asked before, I did search here but couldn't find anything Thanks
Datepicker Input Text Field Issue 2
Datepicker Input Text Field Issue 2: Note : This post is similar to one I had posted 11 days ago, but it differs slightly due to requirement changes and as a result messed with the behavior. I am having trouble with the JQuery datepicker control, because it’s triggered off of a text input field. Important Note: User needs the ability to manually enter the date. Technologies used in this issue: · ASP.NET using the 3.5 .NET Framework · C# · jQuery JavaScript Library v1.10.2
prettyPhoto Pluggin
I have the working code a the Pretty Photo Pluggin , but i wanted to understand the code better Below is the html code . <a href="http://4.bp.blogspot.com/-Uz67VhpSrN0/T5_sPAwTinI/AAAAAAAAAyo/jA0fkFvsDT8/s1600/Beautiful-Rose-Flowers-Pictures-And-Wallpapers74.j.jpg"> <img src="http://4.bp.blogspot.com/-Uz67VhpSrN0/T5_sPAwTinI/AAAAAAAAAyo/jA0fkFvsDT8/s320/Beautiful-Rose-Flowers-Pictures-And-Wallpapers74.j.jpg" width="246"/> </a> and below is the Jquery code . jQuery("body").on("click", "a[rel^='prettyPhoto']",
Customizing datepicker with background colors
I need a datepicker to show 14days time representation as shown below 14 days time starts on Saturday and end on next Friday (in this month 5-18), again new 14 time period starts on 19 and ends on 1st of Aug. i want to differentiate the each 14 days in a month with some background color (i just underlined in picture) and i also would like to give some background color to alternative Fridays. How can i achieve this. Thanks in advance
jqueryObject.selector property
Hello, The documentation http://api.jquery.com/selector/ says that the selector property is going to be deprecated soon. However, i see that the selector property is available in all versions of jQuery upto 2.1.1. So does this mean that this feature is going to be removed from all versions or only in the latest version? Also, can you explain why this is being deprecated. This feature seems quite useful when trying to identify the element on which say, an event listener was registered. We are trying
Firefox ignoring min-height for height: 100% children
This issue is causing me some headaches trying to put an iframe inside a page. The page is automatically getting a min-height to account for fixed headers and footers and such, and that appears to be maintained on page transitions and window resizes. The problem is that if I put <div style="height: 100%"><iframe style='height: 100%'></iframe></div> inside the page, FireFox doesn't render it right. It seems to be ignoring the min-height as a height indicator altogether. So, the iframe gets the
Will Disabling the Tab key on textboxes cause any issue with data?
Hi All, Recently I added a script to my page to prevent the user from tabbing through certain textboxes. Here is the script That I wrote: My question is, is this safe? I ask because, I have a text box that is getting the cost of a service for a record, and when I look in my database, the cost has been inserted into all records??? I checked my back end and everything looks fine. Can anyone break this script down and tell me exactly what it is doing? Thank you so much. I put this script together from
Using jquery impromptu with c#
Hello, I'm just starting to use jquery for the first time and I'm having a hard time figuring out how to get the value from a user selection prompt to my server side code. I've created a hidden field, but I'm not sure how to set this value in jquery. Here is my code <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript" src="jquery-1.11.1.min.js"></script> <script type="text/javascript" src="jquery-impromptu.min.js"></script>
id on click help
I'm having a problem with referencing #dropdown-suggestion ...when I use the on click function to create a action nothing happens...any ideas please...thank you...other than that all code works great $( '#' + selector).data( 'ui-autocomplete' )._renderMenu = function (ul, items) { var that = this ; $.each( items, function ( index, item ) { that._renderItemData( ul, item ); }); $(ul) .attr( 'tabindex' , -1 ) .addClass( 'dropdown-menu' ); $( '<li></li>' ) .append( "<a>Hide Suggestion</a>" ) .addClass(
How to detect if id exists on window.opener screen
Hello, Im trying to detect if an id exists on a window.opener to keep from creating a duplicate. But Im getting an error. var $id = this.value; if(window.opener.$("#" + $id).length == 0) { window.opener.$("#CC").append('<br><input type="text" name="SCCC" ...id="MYID" Im getting the below error. Uncaught Error: Syntax error, unrecognized expression: #MYID
check back in $.post
Guys, good morning! I'm in trouble and need your help. My situation is as follows: In the onclick of a form button, I call a function called register (below code) function register(){ $.post("register.php",{usu_email : $("#register_usu_email").val()}, function(data) { if(data === 'yes'){ ... }else{ ... } }); }; The goal is to verify if the email is already registered in the database, if so, returns a 'yes', and do a script for error. Within
Refresing jquery dialog content not working
I have the below code for launching a dialog and refreshing it with an image and time stamp every minute. The initial load works fine however on the refreshes the time stamp changes but the image doesn't. I have the cache setting as false and the image file returns with the cache headers set to expire in the past. So I'm a little stuck seems to happen in all browsers. Any advise would be appreciated var div = $('<div id="'+id+'"><div id="wait"><img src="images/loading/ajax-loader_teal.gif"></img></div>').dialog({
Next Page