how to feth data from thirdparty server with ajax
$.ajax({ type : "POST", cache : false, url : "https://in.yahoo.com/?p=us", dataType : "jsonp", success: function(Result){ alert(Result); } }); i got following error Uncaught SyntaxError: Unexpected token < link http://jsfiddle.net/3908050/sqrh4doh/4/
Need Performance Improvement Tips for JavaScript / jQuery / CSS and HTML5
Hello, Could you please share your experiences for improving performance for web site developed using jQuery JavaScript CSS and HTML I got some good post regarding performance online but I am looking for some tips and tricks I can use in my regular development. like which event handler technique to be used, which CSS properties are costly, what should be avoided while using jQuery/JavaScript.. thanks, KK
How might I clone a div on mouseover to show on a different portion of the page
I am learning jquery and my hunch is that it would be the ideal tool to use for what I want to accomplish. I would just appreciate if someone could point me in the right direction, let me know if I'm on the right track, just so I can focus my efforts more effectively. I'm making a periodic table (my current table) www.boulderdan.com The effect I'd like to have is that, when I mouse over each individual element, information about that element would show at some place else on the page, for example
Get length of children in Json
Hi, I use Json for transform data from server to client here is my question: How can I get length of Phones from PhoneBook...? {"PhoneBook": [ { "Phone": "9965212", "Phone": "235645", "Phone": "42155553" },{ "Phone": "2354444" },{ "Phone": "4512453", "Phone": "54534232", "Phone": "45687322", "Phone": "51231545", "Phone":
Form Progressbar + PHP Session variable updating progress
Hey everyone. I just wanna share an idea that I have after some research for a simple and functional way to do update a progress bar using the $_SESSION variable of PHP. Yes, I know most people uses some file written by the PHP with the data, but this way is faster and wont consume many resources. In this example, given a Form with two Inputs (From and To). From [number] To [number] These values will be poster by $.post() function to the Load.php file so it will do a loop (FOR) for every number between
jQuery .toggle from right to left?
$(function(){ $(document).on("click","#B",function(){ $("#side").toggle(); }); }); This toggles it on and off when I click the button... How do I make the div #side slide in from right to left and then back?
access each other elements from different xhtml pages included in one single xhtml page
Hi everyone, I'm using seam and I'm using jQuery in order to edit some components of a xhtml page. In my xhtml page I have several xhtml includes: <ui:include src="test1.xhtml" ></ui:include> <ui:include src="test2.xhtml" ></ui:include> <ui:include src="test3.xhtml" ></ui:include> My question is: How can I access test2.xhtml elements from test3.xhtml elements? e.g: An event is triggered when I change the selected value of a combobox in test3.xhtml. In test2.xhtml I have some checkboxes selectBooleanCheckbox
Benefits of using Backbone over jQuery plugin for this example
I'm looking to understand what the key benefits of using Backbone over a jQuery Plugin for this scenario: I have 5 main sections of my application that users navigate to. I use oAuth2.0 for authentication and to access the application (all sections). One of the sections has 4 columns across the screen. Each column is an unordered list. I want to allow users to filter and sort these lists. In addition, when a user clicks on a list item it takes them to an edit page (different URL) where the user can
Something like data-role="collapsible" but without icon?
Hi, i'm looking for something like this but WITHOUT the icon: <div data-role="collapsible" data-collapsed="false" data-theme="c"><h3>Test</h3>Bla...</div> Collapsing is not needed... i just want that combination of header and content. Many thanks!
Else if Jquery
<script type="text/javascript"> $(document).ready(function teste() { $("[id$=dialog-confirm]").dialog({ resizable: false, height: 250, width: 500, modal: true, autoOpen: false, buttons: { "Sim": function () { $("#content").hide(); $(this).dialog("close");
Display php returned database records in another div
Hello, sorry am a newbie in JQuery. I have three php files, one of the php file contains the selectable records, which i need after a selection the query fetches the data from the table and displays them in another php file. This process is working fine. The problem i have is, i need to display such php returned records into the other div. When am doing this i can just display the php but no records are returned. If i do it without div, the records are returned and display but NOT in the div. You
Wait for signal from server or mysql
Hi. Is it possible that with the help of Jquery wait for the change in the database, and then gives an overview in a div (for example <div class="result"></div>) but with no permanent refresh div's for every "n" seconds If this possible, can you show me an example or explain how to do it? PS: to be more precise I want to just after the entry of a new row in the database, in diva result, added a new value that contains this(new row values in the database), but without constant refresh of the same
Stop slide toggle when toggled
Hi i'm working on a site which requires a new form field to become available once the other radio button has been selected. I've got a slide toggle to work when this is selected but if i were to click the radio button again it performs the slideup action. Is there anyway to stop the slideup action happening if the toggled element is clicked again? i only want it to slide back up if the other radio buttons are selected. Heres my fiddle http://jsfiddle.net/e08jo9gr/6/ Help much appreciated.
Colorbox isnt working!
I´ve got a problem with the jQuery colorbox. Somehow the colorbox wont open but I dont know why: http://jsfiddle.net/Lgdez0dn/7/ Tanks for the help
Help in Datepicker: How to disable default date(today) when I leave the input without value selected
When I click on the datepicker input but not select a date and I leave the input (click outside) , a default value is set: current date (today). How do I disable this? I've done the debbug the chrome, but could not find.
JQuery UI Autocomplete on IE6: open menu is rendered behind DropDownList control on page
dear all, i am using JQuery-UI Autocomplete on the page. beneath the autocomplete, there is a DropDownList. when browsed on IE6 , and when i write inside the input field of the autocomplete, the suggestions menu opens successfully, but it gets rendered behind the DDL... i added this style to the same page having the autocomplete and DDL, but with no success: Collapse | Copy Code .ui-autocomplete{position : relative; z-index: 100 !important;} p.s. : it works fine on Chrome... thanks
returning array
I am trying to return an array: PHP; $query = mysql_query("SELECT * FROM product_list_sub WHERE id='$prodID2'"); if (mysql_affected_rows() > 0) { $row = mysql_fetch_array($query) or die(mysql_error()); $stuff = array(); $name = $row['name']; $price = $row['price']; $query2 = mysql_query("SELECT * FROM product_list_sub WHERE id='$prodID2'"); if (mysql_affected_rows() > 0) { $row2 = mysql_fetch_array($query2)
Basic page template does not work
Hi, i would like to test the "Basic single page template" from here: http://demos.jquerymobile.com/1.4.5/pages/ I changed the [version] into 1.4.5: <!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="http://code.jquery.com/jquery-1.4.5.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div
Could anyone advise on how to reset or go to a default value of a dropdown from another dropdown?
Hi all, Probably a straight forward peice of code, but I have this form created with RS Forms; http://strictlyoldskool.net/index.php?option=com_rsform&formId=9 When "Choose Package" is selected and the option "Poniete Playa SC Apartment 2-4 people" is selected, i have a 2nd dropbox called "Add a 3rd or 4th Person". If a 3rd or 4th person is selected it works great and the totals tally up, however if while a 3rd or 4th person is selected, and then say the "Choose Package", Tropical hotel is selected,
Referencing local copies of JS and CSS files
I am building a form dynamically using PHP and the jQuery DatePicker widget. The form will have a variable number of date fields in it depending upon the number of records retrieved from a MySQL table. I can get this to work fine... until I start trying to change minDate and maxDate options for each DatePicker instance based upon values retrieved from the MySQL table. I decided to simplify the code to remove references to the MySQL table data until I can figure out how to get the loop to work for
Document JQuery in asp.net
Hi every body, i want to documents toturial Jquery in asp.net, can you hepl me , pls. thank!
Pegar valor da session
Preciso pegar o valor da session mas não estou conseguindo. $(document).ready(function teste() { if ('<%= Session["CheckBoxListProduto"] %>' == "Saúde") { $("[id$=dialog-confirm]").dialog({ resizable: false, height: 250, width: 500, modal: true, autoOpen: false, buttons: { "Sim": function () { $("#content").hide();
Estou usando Master Page ASpNet e não funciona com Jquery.
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" CodeBehind="WebForm1.aspx.cs" Inherits="Movimentacao_Web.WebForm1" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <script src="http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"
Show the second block of check boxes if first block of checkboxes completed.
i want to Show the second block of check boxes if first block of checkboxes completed. i.e; first block has 2 or 3 check box if all were selected then second block will be displayed and same technique will be used for third one. if any check box were unchecked from block 1 then next block 2 will automatically disappear and unchecked the select check box of block 2 Please help
jQuery working or not?
Hi all, I have just started using jQuery But I'm not sure if it is working or not. I am trying to hide a dive box as per this tutorial (https://www.youtube.com/watch?v=hMxGhHNOkCU) but it's not happening - whatever I do. <style>#movebox { width: 100px; height: 100px; border: 5px solid black; position: relative;}</style> <div id="movebox"></div> <script> $(document.ready(function() { $("#movebox").hide(1000); }) </script> Annoyingly jQuery seems to be working and likes this code <script type="text/javascript">
The class is not adding
Hi everybody, i'm trying to add, one of my input a class, if this input is empty, but can't understand why, it does not working Here is a part of my code: if(jQuery(this).find(".LinkbuilderForWords").val() == "") { jQuery("input").find("placeholder").css("background", "red"); errors = true; return; }
mobile website evaluations
Hello, I'm trying to get more into mobile website design and dev. I'm looking for a website where I can post references to different mobile websites to get reviews, feedback, critique, implementation insight, etc. Basically, I'm trying to form an opinion on the pros and cons of different approaches and determine the best overall approach to use. Are there any websites/forums you could recommend for this?
Do I need a loop?
I am creating a one page WordPress website and I am having trouble with some jquery. I have several pages and maybe several more that need to have a custom scrollbar on the page. I have the scrollbar working great. All I have to do is create a div, give it the class of scroll and I am in business. My problem is that if a new page is created and the content of that page isn't greater than the default height of the div which is 400px, then the scrollbar still shows on the page. So I thought I would
Please jQuery cart
I'm using CodeIgniter cart but do have one problem is the updated number of shopping cart products as well as the effect not beautiful. So who has jQuery update their cart with reference to afford offline Thank you
jQuery.submit.js not fully working on dropdown select
Well i hope someone could help me with this. I have some select dropdown boxes in a form they are looking like this: <select name="swap" data-placeholder="swap" class="form-control alertbox"> <option></option> <option value="1">Yes</option> <option value="9">No</option> </select> <select name="repair" data-placeholder="repair" class="form-control alertbox"> <option></option> <option value="1">Yes</option> <option
Adding an Attribute to a Clicked Element on a Page Being Displayed in an Iframe
Hi all, I am trying to add an attribute to the clicked element on a page that is being displayed in an Iframe. Below is my code inside the document ready function but it is not working: $('#Iframe').load(function () { $(this).contents().find("body").on('click', function (event) { var a = event.target.tagName; frameContent = $("#Iframe").contents().find(a); $(frameContent).click(function (e) { if ($(e.target).attr("contenteditable")=="undefined"){
Best way to handle this scenario in ajax?
Hello, If you navigates away from the page either by refreshing, clicking a link, or changing the URL in the browser during ajax processing, it throws error..so found that I can simply catch like this for this case.. $(document).ajaxError(function (event, jqxhr, settings, thrownError) { if (jqxhr.readyState == 0 || jqxhr.status == 0) { //...page navigated away .. return; } }); One thing also I noticed, when my server went down, the status value
tabs insets to the left
Is there a way to position tabs insets to the left from content?
Jquery Validate browser support
Hi, I have a client whose browser (IE - version unknown) repeatedly does submissions with either blank submissions or values in the wrong place (i.e. phone number where email address should be). I do not think this is malicious tampering as the submissions are done as tests for campaigns. It also happens enough times that it can not be coincidence. jQuery version: http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js Validate version http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js
Stop interval or event listener
I am going to hide a div when a video is played after 5 seconds of inactiv mouse movement. This works so far. But what don't works is that if I am going to hit a pause button that the div won't disapear anymore. How can I stop that. My code below: function val() { if (interval == 5) { /* if intervall reaches 5 the user is inactive hide element/s */ $('#controls').hide(); interval = 1; } interval = interval + 1; console.log(interval);
Get selected a checkbox in checkbox array
I am having an array of checkboxes like: <input type="checkbox" value="8029" id="chk_status110" name="chk_status[]"> where each having its own unique id and value. How can i check / uncheck specific so that it should automatically get its id and check it if it is unchecked or uncheck it if it is checked. When i try $(':checkbox').prop('checked', true); it selects all and not a specific one when i click on its label.
Is there a good way to put scrollbars on a <div> that contains an asp:GridView?
I have a have an asp:GridView called SquadronGridView that has 10 DataFields (2 are hidden). If my GridView has too many rows, I want to give it scrollbars. I place it in a <div> called #grid and use the following script: <script> var divWidth = document.getElementById("SquadronGridView").offsetWidth var divHeight = document.getElementById("SquadronGridView").offsetHeight $('#grid').remove('height') $('#grid').remove('overflow-y')
Change button text on alternate clicks
What would be a way for me to change the text in the button after the first click event, and then alternate the text content on subsequent clicks. ie - Hide Flag / Show Flag Here is a fiddle and thank you for any suggestions Pedro http://jsfiddle.net/fa4ds3oe/
Form Preview plugin presentation
Hello everyone! I want to present you my first jQuery plugin, Form Preview. Form Preview is a plugin which allows you to visualize form input. Some examples of application for this plugin: Website profile preview Shop item card preview Any preview, basically Website with demo and github repository with documentation. So what do you think about my plugin? P.S.: I'm not sure if it suitable category, however, it's worth a try
occurrence in an array
Hi, I am trying to find the occurrence of numbers in an array, I want to display each number and how many times it is occurred in an array, I tried this : http://jsfiddle.net/mlotfi/qa3kyL04/ 1) using console.log it is working, but the numbers are repeated. 2) when tried to display using div it does not work. Thanks, your help is appreciated.
Next Page