JQUERY-1.8.2.js compatibility with Safari 10.1
Hi All Could you please let me know whether JQUERY-1.8.2.js is compatible with the Safari 10.1 browser on Mac OS Sierra. Appreciate you help. Thanks, Achen
Intermittent problems
Hi all, I'm new to jQuery and also pretty green with JS, but not bad at PHP etc. I have a site which unfortunately isn't exposed on the net so I can't directly link you to it. I'll try to explain the problem though. My page uses the following routine to load a separate PHP page into a DIV: function display_table() { var ajaxurl = "./includes/modules/sec0020/sec0020table.php?page="+page+"&loc="+loc+"&scol="+scol+"&fcol="+fcol+"&filter="+filter; $.ajax({ url: ajaxurl }).done(function(data)
Getting events from newly created child windows
This is not a strictly jQuery question, though it would be nice to achieve the result in jQuery. Suppose you create a window with the jQuery (or JavaScript) in your webpage. You can name the window, and you can get a handle to it. I want the same events and functions to apply to the child window (or new window) that apply to the outer window. So, for instance, if I have a mouseup event in the main window that brings up a window that says "Hello World", I want it to work in the newly created window
jquery and jquery.plugins.r2.js
Hello. I will start by saying that this is outside of my knowledge base but I am troubleshooting. I have a client site that all of the sudden stopped working. It seemed to loose all of its styling but the reference for that is unchanged as are the pages. So I looked at the error console and discovered that the jquery is outdated and throwing errors. The CMS is outdated as well but we don't have the passcode to update it. It also references the plugin below: jquery.plugins.r2.js I am unable to find
How to hide / show a button in jQuery
I have a form and three buttons on the bottom, lets say A, B, and C. When I click on A it needs to disappear and the B and C need to be the only ones that are shown. After clicking on either B or C, the button A needs to reappear again. jQuery is what I need to use.
Save json data to database
I have loaded a file with json data into a jquery datatable. I was wondering how I can save this data to a sql server database table. Thanks !
Simple way to disable jQuery on web page containing many edits?
Is there a simple way to turn jQuery on or off on a page containing many edits? The reason I ask is that I have three pages that use jQuery and validate() on forms where users are given input. The various edits on the second and third form work just fine but none of the edits on the first form seem to be working. It's not that their are coding bugs making some of the edits work incorrectly: NONE of the edits seem to take place. It's hard to remember details from several years back but I think I might
How to read the text file and show the information on the page?
Hi guys! Please, be gentle to me! I’m just trying to get into jQuery… My first try is to read a text file and put information read on the page. I found, modified a little and used this code: <script> $.get('Files/Address.txt', function(textData, status) { var aLines = textData.split("\n") alert(textData + '\nStatus = ' + status); // this works, all lines from the file are displayed $.each(aLines, function(n, sLine) { $('#textFromFile').append('<div>'
How do I require one checkbox out of a group of related ones to be chosen?
I have a form which has five related checkboxes. My user can choose one or more of the five checkboxes but I need to ensure that he selects *at least* one. I don't care which one(s) he checks as long as he checks at least one of the five. How do I do that in jQuery? I realize I'm going to have to test if any of the checkboxes have been checked but I can't figure out which field to associate the edit with since no specific checkbox has to be selected. Do I associate it with the Submit button instead?
Release levels of jQuery?
I have some jQuery code that I wrote 4 or 5 years back. They files include these lines, which I think were the current release levels at the time I wrote the code: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.js"></script> I'm back updating the code now. Should I be updating the versions of the code to the now-current version or is it fine to leave the levels are they are? Is there
Debugging Ajax Jquery
Using the code below, is there a way I can see the json being returned using a debugger? $(document).ready(function () { $('#example').DataTable({ "ajax": '../data/arrays.json' }); });
About javascript function closure
Dear all: I try to improve the ability of javascript, and meet a problem about closure, like following example: function Y(f) { return ((function(x) { return f(function(v) { return x(x)(v); }); })(function(x) { return f(function(v) { return x(x)(v); }); })); } var factorial = Y(function(fac) { return function(n) { return (n == 0 ? 1 : n * fac(n - 1)); } }); console.log( factorial(5)); I don't know how the function Y(f) works. I have add console.log to see the detail , but still confuse
Finding title in content using contains()
Is it possible to do: if first word in #title appears anywhere in #content than change color of #title to green? I tried an if statement but Im not sure whats going on there. Also im trying it with one line of jquery but Im getting lost in the stacking of methods/selectors. I doubt I can do it with just one line of jquery. <p id='title'> paragraph </p> <p id='content'> this is a paragraph </p> $("#content * :contains(#title.text())").css('color','green'); //---OR--- //(below I'm only
Plugin to circle items in a photograph?
I'm trying to build a web app which allows users to tag items in a photograph. The items are seldom rectangular, so plugins like imgAreaSelect aren't quite right. I'd prefer something that feels like smoothly dragging your finger around the items on an ipad, rather than a "click on points of a polygon" like polyclip.js. I want to be able to show the tags when the user mouses over the "circled" area, so I need to be able to save the select path in some form. Any suggestions? Thanks! Chris
combining 'toggle' and 'animate' ?
Hi folks, Can't get the syntax right : the idea is to, on a first click, fade an element out, then move it, and then fade it in: <p onclick="$('#myelement').fadeOut(2400, function() { $('#myelement').animate({left:'+=120', top:'-=30'},100, function() { $('#myelement').fadeIn(2400); }); });">click</p> And then, to reverse this process on the second click. I've tried several combinations using 'toggle'. I think it's not possible? as there
Proper Value to Return to success function from program
This is the ajax function I've been working with - it works fine, all data is being sent back, parsed and written into the correct databases <script type="text/javascript"> $(function() { $('#submitButton').click(function(){ var reservations = $("#main_table table input[name=name]:checked").map(function() { row = $(this).closest("tr"); return { recordid : $(row).find('input[name=record_id]').val(),
Error using json.stringify to send array to php
Now that I have my map function working properly, I need to send the array to php - here is my script <script type="text/javascript"> $(function() { $('#submitButton').click(function(){ var reservations = $("#main_table table input[name=name]:checked").map(function() { row = $(this).closest("tr"); return { recordid : $(row).find('input[name=record_id]').val(), firstname : $(row).find('input[name=firstname]').val(),
find the latest version of jquery programatically
Hi! I was wondering if there was a clean way to get the latest version of jQuery programatically. I simply want to get the latest version number to compare against my present version so I can implement and test the new version for stability across my clients without needing to F5 https://jquery.com/download/ to check for new versions. I write in PHP primarily, and a simple cron script to ping a server each day to check for new version is ideal. Maybe a jQuery call already exists for similar purposes,
May I get explanation for this Map method
What is going on here, what is the scenario that makes one understand these following two statements: $("div.dcell").map(function(index, elem) { return elem.getElementsByTagName("img")[0]; }).css("border", "thick solid red"); $("div.dcell").map(function(index, elem) { return $(elem).children()[1]; }).css("border", "thick solid blue");
Argument in a Function: How does a function get its argument in jQuery
I don't really understand how the following function gets its argument, where from. Is there a calling statement that passes the said argument to to the function. <script type="text/javascript"> $(document).ready(function() { $("img").filter("[src*=s]").css("border", "thick double red"); var jq = $("[for*=p]" ); $("label").filter(jq).css("color", "blue"); var elem = document.getElementsByTagName("label")[1];
Validate date - User should select only next month data from today's date
Hi, I have a date field to which, I want the user to select only dates from next month from today's date. The date field is in MM/DD/YYYY format. I tried the below code, but it is not working var validflag = true; var msg = "Please provide a valid details for the below: "; var isMessaged = false; var inputStartDate =""; var dtStartDate = $("input[title='My Start Date']").val(); var todaysDate = new Date(); var newtodaysDate = todaysDate.setMonth(todaysDate.getMonth() + 1); if(dtStartDate.length
Check object type and create dynamic content accordingly
I'm working on application which will create dynamic content based on the type of object. The object type can be 'company' or 'employee'. The objects with the type 'employee' are created using bootstrap modal. I'm facing with a small problem when I'm doing that. The dyamic content is getting duplicated when I'm generating that. Also, when I add consecutive objects using modal, the content gets refreshed or lost. How do I fix it? Here's the JSfiddle.
Disable next button in the last page
I'm fetching some data through JSON in a container(it is a table), which has previous & next buttons. In each page, I'm displaying 20 records from the JSON. Now, I need to disable the 'next' button, based on the value of the property 'totalRecords' in the JSON. Calculation: So, let say, the value of totalRecords = 238. Which means I should have (238 /20 = 11 pages with 20 records and the last page with 18 records = 12 pages overall). So, how do I ensure that 'next' button is disabled on 12th page
What is the meaning of $("body *");
I was doing well until I met with the following example. I think the key to understanding this example is the statement mentioned in the subject line: <!DOCTYPE html> <html> <head> <title>Example</title> <link rel="stylesheet" type="text/css" href="styles.css"/> <script src="jquery-2.0.2.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { var elems = $("body *"); // find an
how to show specific time zone in website?
Hi,i am creating a website for a radio station. radio station is located in india. i want to show specific time zone time in my website(Indian standard time). or is there a way to show UTC/GMT time? so i can add up +0530 hours to UTC/GMT time. I want to show schedule, now playing and next program based on time. Is there a way to do that in jquery? sorry for my bad english.
Capturing a browser window close to give a "Save Entries?" dialog - in jQuery UI
I'm hoping to be able to catch a user who is closing the browser window to put up a jQuery UI modal dialog if it's detected that they've made some form changes without saving them. The page is an incremental interview process in an accordion, with the steps each saved using AJAX methods. But if they close without committing a save I'd like to be able to warn them. I've read a number of forums that give advice regarding this, but it seems to be a moving target. I've been trying: // Set up to detect
Replace an object with another in an array using bootstrap modal
I'm trying to update an object if it's type="external" with the 'edit' button. On clicking edit, I get a pop-up/modal, wherein I can update the details. I need to fix 2 issues: * I can't see the old values in the update modal while trying to update the data in my actual application. * Also, on clicking update, it is refreshing the entire page content. I guess that's happening due to replaceWith() method. JSFiddle Note: I'd tried using splice earlier, but it causes duplication of updated objects.
Update an object in the array using a modal form and display updated details
I'm trying to update an object with type="external" by clicking on the edit button. It brings up a pop-up, wherein I can enter the new information and it should then update the user accordingly. But somehow it doesn't seem to work. It just triggers a page refresh and nothing happens at all. Could you please help me fix this? JS Fiddle
finding focused item in iframe
I'm trying to find the focused item within an iframe but failing! Whenever I insert into the iframe, the item appears to be focused. For example if I insert a table then the cursor is always in the last cell. As a I test I am trying to change the background color of the cell to see if it is working but this always changes the iframe body not the item inserted so not picking up the focused "thing" var d1 = $.Deferred(); $.when(d1).then(function () { var $iframe = $("#ifr").contents(); var focused
How to allow one page to remote control another without using a database
I am new to JQuery. I would like to create a page that can remotely operate a second page. I can envision how to do it if I involve a database, but I'm not sure how to do this without one. I will describe my primitive database method, and I'm hoping someone can advise me on a better way. Page A has a slider within a form that can be moved up and down. It also contains a JQuery "change" function that serializes the form data and uses Ajax to post the slider values to page B (in realtime). Page B takes
changing css of focused element in iframe
I am inserting html into an iframe via the execCommand(). Say for example I insert a table, the cursor will then be active in one of the cells. How do I capture the "$(this) of the focused cell and store it in a var so I can later change the css of it? I only seem to be able to find the iframe as being focused.
Edit an object in an array and display updated information
I've an array of objects (myData) which has objects with type "internal" and "external". I'm creating divs with class="box" out of the objects in array and displaying some information of the corresponding object. I've an edit button in the div.box, only if my object type ="external". So, on click of the edit, I want to update the information(company or url) of that object in 'myData' array. Also, in the displayed div I'd then like to display the updated information (calling createDisplay() method
Add DateTime as hidden variable within form (change)
I am using "change" to serialize variables within a form $(function() { $("form").on("change", function() { var s = $(this).serialize() console.log(s); }) }) I would like the form to include the DateTime as a hidden variable within the form (along with my other data). How do i do this?
Hide the edit button in a dynamic div if it satisfies a condition
I've a dynamic div which contains some information and an edit button. But, some of these dynamic divs should be editable. I'm generating all of these dynamic divs from my array of objects, which also holds the data for objects which have type="external". Each dynamic div will have a class called 'box' and each dynamic edit button has a class called 'edit-btn'. So, I've a condition like, if in dynamic div the obj.type="external" then it the edit button should be available else it should be hidden.
WordPress Website
Hello Experts, I want to develop a website with WordPress. Is there need to be jQuery? Thanks. __________ http://hounslow-escorts.com
Slider and toggle button that update the database in realtime
First time JQuery user (my background is in ColdFusion). I need to work on a project that involves having a slider and a toggle button that update a database in realtime (without reloading the page). I would also like the ability for elements on the page (like text values) to update in realtime based on what is in the database. Can someone please help me get started on how this sort of thing is done?
Using Jquery with asp.net
How does using jquery with asp.net differ from using it on other platforms. Thanks !
Saving AJAX JSON to an array
How do I save the JSON which I'm receiving through ajax to an existing array? I first need to delete everything in my array savedData and save the JSON into that. Here's the code :- function getArticleOnPageLoad() { $.getJSON("http://www.myurl.com/myJSON.json", function(data) { savedData = data; createData(); }).fail(function(error) { console.log("AJAX ERROR: " + error); }); }
Jquery Autocomplete displaying ID in a seperate text box
Good Day I am a total novice and trying to use autocomplete to display selected results in separate textboxes but I am totally lost. I need to capture the Full_Name and ID in the separate textboxes here is my current files asp file: <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="SearchTest.aspx.cs" Inherits="SearchTest" %> <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent"
Previous and Next buttons are getting hidden in all pages
I've 2 pop-ups to display the user list & admin list which would display 10 results per page, which is working fine. I'm getting the page nos. from the java servlet in the JSON. Note: There are 2 parameters passed in the url - resType and pageNo. pageIndex returns 0, 10, 20 ...(multiples of 10). result: checks what sort of result I want. You can ignore this part. So my url in the createTable function looks something like this instead - ''/abc/myData.json?result="+resType+"&pageIndex="+pageNo In
Next Page