no conflict between two jquery versions and the jquery ui
I have a problem to use 2 different version of jqueries. At the tabed page i use : <script type="text/javascript" src="jquery-1.11.1.min.js"></script> <script type="text/javascript"> var s = $.noConflict(); </script> So in the sript i use like: s(document).ready()}; On the tabs page i use <script src="//code.jquery.com/jquery-1.10.2.js"></script> The problem is i also include the UI library whic use $ insted of s So i get error TypeError: $.ui is undefined and TypeError: s(...).slider
How to maintain sortable divs indexes persistancy on browser refreshing?
Hello Everyone, I am facing problem with divs indexes persistancy on sorting when browser refreshing. checkout this fiddle once and help me. http://jsfiddle.net/mdw9gpq6/2/ Here how can i maintain the divs persistancy on sorting when page refreshing. Thanks in Advance Satish Chandragiri
Issue On Exporting JSON Array to Table
Can you please take a look at This Demo and let me know how I can export new entries from fullData into the #records_table table var fullData = { "users": [] }; $(document).ready(function () { $("#addtoJSON").click(function () { var user = $("#user").val(); var age = parseInt($("#age").val()); var grade = $("#grade").val(); var mark = parseInt($("#mark").val()); var data = { name: user, age: age, grade: grade,
Open menu + Close menu
Hi everyone! I have a menu and i need it to open and close on a click + the on a left side of menu (plus and minus) must change as well. We can make a close/open menu with a method toggle(), but have can i make to change a picture with every click? Here's my code(i was trying to make it with "var i" but it was useless): $(document).ready(function(){ var i = 0; $(".go").click(function(){ if(i == 1) { $(this).next().children().children().children().children().hide(); $(this).css('background-image','url(<?php
Store Pages in Variable; Stumped on .load or .get
Hi, I have about a dozen pages I'm trying to load into a div on click. I'm thoroughly stumped. I accomplished this quite easily using ActionScript 3, but do not understand .load or .get. To clarify, I have one main page that contains content in a div. When the user clicks the next button, the content inside the div is replaced with new content from another web page. I'm thinking this will require storing an array position in a variable. Any advice or suggestions is GREATLY appreciated. Thank you!
custom event not seeming to be handled by on()
Hi all, I am trying to throw a custom event and have it handled using .on(). Here is the gist of what I have: jQuery( document).ready( function(){ jQuery( 'a' ).click( function( ev ){ ev.preventDefault(): ... console.log( 'triggering controllerChange event ...' ); jQuery( document ).trigger( 'controllerChange' ); }); jQuery( documunt ).on( 'controllerChange', function( ev ){ console.log( 'controllerChange being handled.'); ... }); }); When clicking a link on the page, I get the 'triggering controllerChange
How To: Execute code created by concantenating two strings
Hi, I'm trying to reuse the AJAX Success Function for another page. This function is in a .js file. The returned data is an array in one situation and a plain object in another. I have tried the below code to differentiate the two. It does not work. Would appreciate help in trying to make this work. R. if($.isArray(pData)) { x="pData[i]"; } else { x="pData"; } alert(x+"['Display_Name']"); // doesn't work
Issue on Exporting HTML Table To Ms Excel in Mac Computer
I am trying to export an HTML Table to Ms Excel Using This Demo but it is exporting a file called "download" (without excel file extensions)and when I double click on that it opens like a text file. Can you please let me know why this is happening? $("#btnExport").click(function(e) { window.open('data:application/vnd.ms-excel,' + $('#dvData').html()); e.preventDefault(); }); Thanks
Help! Where to include JQuery file?
Hi all, I have used jquery inside my javascript function, which is located in a javascript file. I call the javascript function from a html file. I include the html file in index.php. When I place <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> at the beginning of the html file, everything works as expected. But when I place, <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="jscript.js"></script> in the <head>
How to suppress chrome help on F1
Hello, Im trying to fire a function during an F1 function key. But Im getting the help screen instead. $("body").on("keydown", function(e) { e.preventDefault(); var keyCode = (window.event) ? e.which : e.keyCode; switch(keyCode) { case "112": clickMove('RFE');
How to set the divs indexes dynamically on page load?
Hello Everyone, Checkout this fiddle once & help me. http://jsfiddle.net/mdw9gpq6/2/ Here how can i set the index positions for each div on page load. Actually I am saving index positions in database. on page load i am going to assign index positions to them. and whenever particular div is sorted, again i am going to save their indexes into database. how can i achieve this. help me. i would be thankful. Thanks in Advance. Satish Chandragiri
proyeccion de imagenes
hola, estube preguntando en un foro de javascript y me dijeron que lo que queria, es mejor con jquery..... lo que deseo es hacer algo parecido a un efecto acordeon de imagenes, automatico. iamginemos cuatro imagenes, estas iran apareciendo una a una de izquierda a derecha, solo deseo que se vea la imagen, y no como en muchos otros efectos que tanto a la izquiera como a la derecha, estan el resto de imagenes para seleccionar (me explique?) debajo de las imagenes, se iran sombreando unas casilla con
The dummy series was written for me. Please explain how do I add intellisense to Sublime Text 3
In a step by step manner that a 7 year old can follow. Thank you for your kind patience with dummies like me.
Adding an alert on .one() on multiple clicks
.one() stops multiple clicks which is fine, how can i add an alert when one hits it next time? $( "#save_btn" ).one( "click", function() { })
How to retain Textbox's State after Postback in asp.net
I'm working on a form which is having a gridview & save button.Gridview has a checkbox & a textbox.If i clicked on checkbox and if it is checked,the textbox in that row becomes disable and if it is unchecked,the textbox in that row becomes enable.For this purpose i'm using following JQuery code & it is working properly. $(document).ready(function () { try { $("input[type=checkbox][id*=chkChild]").click(function () { if (this.checked) { $(this).closest("tr").find("input[type=text][id*=txtRemark]").attr("disabled",
jQuery is included more than once
Hi frnds... I have using my webpage with bootstrap modal pop up in that pop i have to load my another page on modal pop by using jquery.load() while getting screen in model pop once again jquery are initialized how i can protect my page of loading jquery only once in my page... Pls frnds tell me any suggestion i m new to jquery.......
required validation is not firing
Hi, i have 2 tab strip i.e general and participants and textboxes on both tabs. need to put required field validation on both tabs for compulsory fields. validation is working on first tab while clicking on save button but not of other tab. if($.trim($('#MainContent_txtboxRequired').val())==' ') { alert("Required must be enter..!"); }
Jquery to validate tinymce control
Hi, I am using tinymce control, i want to validate tincymce textarea conrol on asp button click. I am using Jquery validation engine plugin to validate other controls in same form it is working fine. How we can make tincmce textarea to validate ? below is the code how i control other control.. <input id="txtsubject" type="text" runat="server" style="height:20px; width:420px;" class="validate[required] txt" />
Prepend and click link
I have this unordered list. It has a + sign to collapse the list. I want to still display the + yet be able to click on the link instead. How can I change this? (function($) { $(document).ready(function() { $(".wpsc_top_level_categories > li:has(li)").prepend("<span class=\"CatExpander\">+</span>"); $(".CatExpander").css( 'cursor', 'pointer' ); $(".CatExpander").toggle(function() { $(this).html( '-' ); }, function() { $(this).html( '+'
create json property dynamically
Hi, First, I am not sure where should I post this question. This is actually general javascript question, however it might be any solution using jQuery. I have code below var options = { groups: { mygroup: { shape: 'circle', fontColor: 'red', fontSize: 18 } // add more groups here } }; Is there any possibility to assign mygroup dynamically? for example: something like I assign mygroup in myvariable var myvariable = mygroup; then I replace mygroup with variable myvariable. Like
insert a div inside a td depending on the value of the td
I have a html snippet generated as below <td class = "ms-vb2" > Amber </td> which i want to change into the below if the value is Amber <td class="ms-vb2"> <div style="font-weight:bold; font-size:24px; font-size:10px; color:white; background-color:#DC630A;"> Amber </div> </td> I am using the below code: $( document ).ready(function() { $('td.ms-vb2').each(function( index ) { if($( this ).text()== 'Amber'){ $(this).css("background-color","#DC630A"); }
Replacing img src in textarea using jquery from a pop-up window
I'm trying to replace the textarea and input box image source in the parent window using jquery from a pop-up window. The text in the input box changes without any trouble, however the text in the textarea box remains unchanged. Here's the code for the parent window: <textarea cols="100" rows="20" class="editor"> <a href="http://www.amazon.com"> <img src="image.jpg" alt="replace image source in this textbox" /> </a> </textarea> <input type="text" value="image.jpg" maxlength="255"
Jquery Conflict
Ok so I have been racking my brain trying to figure this out for quite some time. I am using a Magento website, and generally only make edits in the backend so as not to mess up our current template. The problem I have noticed is when I make a CMS static block that calls for jQuery, it interferes with the jQuery that is already on the parent page else where, such as my drop down navigation. So either the navigation works or the block works. But both won't work at the same time. The static block in
Issue in Cascading dropdowns
Hi all, I have a strange issue. I have two dropdowns. When one of them is selected, based on the selected value, the second dropdown automatically fills. Iam filling both the dropdowns using Ajax callbacks from JQuery. The problem iam facing is iam unable to set the index position of the second dropdown. I have tried all the methods to set, but unable to succeed. What happens is I can see that the value is changing in the second dropdown for a second, but later it immediately resets to index 0.
How to split long text in jquery
Hi, I have a Jquery varibale which stores long text, because of the string length i am not able to set the value to textarea. can any one tell how we can split and set value to textarea. Like lets say split 500 characters and finally add 500 characters + 500 characters.... till end of text.. Jquery Script: <script type="text/javascript"> $(window).load(function () { jQuery("#DIDExcDivision").on('change', function () { var res = '[fname], I work in the [divname] Single
delay function
How can I set Timeout on row where is $("#back") ... $(document).ready(function(){ $("#item").hover(function(){ $("#back").css({ "background-image":"url('images/asd.jpg')","transition":"background-image 500ms ease-in-out" }); }); $("#item2").hover(function(){ $("#back").css({ "background-image":"url('images/eee.jpg')","transition":"background-image 500ms ease-in-out" }); }); $("#item3").hover(function(){ $("#back").css({ "background-image":"url('images/rrr.jpg')","transition":"background-image
Multiselect onclick it select/highlights many items instead of just the selected one
Please see below code and help me where i need to change <select onclick="selectMultiple(this);" size="11" multiple="multiple" name="<?php echo esc_attr( isset( $field['name'] ) ? $field['name'] : $key ); ?> []" id="<?php echo esc_attr( $key ); ?>"> <?php foreach ( $field['options'] as $key => $value ) : ?> <?php if( has_term( $key, $taxonomy , $_GET['auto_id'] ) ) { $is_selected = 'Selected="true"'; } else { $is_selected = null; } ?> <option value="<?php echo esc_attr( $key ); ?>" <?php echo $is_selected;
reading json data from a file
I am trying to read a JSON file from a file named sites.js which seems pretty straight forward but I can't get past an error event firing. Initially I did not tell the ajax() call the datatype, and that caused the data to get written to the console as an unrecognized expression. sites.js as exported from mySQL: [ { 'Database' : 'datasite', 'Table' : 'sites', 'IP' : '192.168.0.101', 'Server' : 'ria' }, { 'Database' : 'datasite', 'Table' : 'columns', 'IP' : '192.168.0.101', 'Server' : 'ria' } ] code
JQuery Mobile to Access Azure Table Storage. Is it possible?
Is there any way to use JQuery to read data from Azure table storage?
Question about mime type processing
Hello, Im trying to make a xcross-domain call to a google drive spreadsheet. The code is below. But Im receiving this error. esource interpreted as Script but transferred with MIME type text/html: "https://docs.google.com/spreadsheets/d/blahblahblah/edit?callback=appendData&_=1411589335949". Refused to execute script from 'https://docs.google.com/spreadsheets/d/blahblahblah/edit?callback=appendData&_=1411589004278' because its MIME type ('text/html') is not executable, and strict MIME type checking
background image animation
hi all, how can I animate background-image? I mean slow loading image ... something like this ... $(this).animate({ "background-image","url('image.png')" }, 500); but this doesnt work for me ... I also tried this ... but it just show after 1s ... with no animation setTimeout(function(){ $("#tblmenu").css("background-image","url('image.png')"); },1000)
jquery Gurus please tell me what is wrong with this code:
When I click submit nothing happens. What I expect to happen is that when I click submit the text in the text box should me copied into the div. <!DOCUMENT html> <html> <head> <title>jQuery Functionality</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <style type="text/css"> #display{ width: 250px; height: 250px; border: 1px dashed grey; } </style> </head> <body> <script type="text/javascript">
AJAX response string comparison
Hi, i am so frustrated from 3 days. i am using html, php and ajax for read file, a line each 2 seconds and compare it with string. The String compare doesn't work and i don't know why... this is my php code CODE Script.php: ---------------------------------------------------------------------------------------- <?php if (!$p_file = fopen("inputfile.txt","r")) { echo "Spiacente, non posso aprire il file miofile.txt"; } else { $linea = fgets($p_file, 255); echo "$linea<BR>"; fclose($p_file); } $content
Help with compare values statement
Is there a better way I can write this statement? I want to check if the ID is any of these. var cat = $("select#category").val(); if (cat == 23 || cat == 24 || cat == 25 || cat == 41 ) {$("select#lamp").html("<option>Some Category</option>");} else { $("select#lamp").html(data);}
jQuery.com compromised, according to report
jQuery.com was compromised around Sept 18, with traffic redirected to a site delivering malware, according to this report: http://www.net-security.org/malware_news.php?id=2869 jQuery.com, the official website of the popular cross-platform JavaScript library of the same name, had been compromised and had been redirecting visitors to a website hosting the RIG exploit kit and, ultimately, delivering information-stealing malware. The report states that jQuery Foundation has acknowledge the exploit, and
How ? select that show exact element
Hi, I am trying to display data in a HTML table, a column in the row is called "country", it shows a select menu that shows exactly the country related to the person : Data come dynamically from a database : Name -------- Age --------- Country Joe -------- 34 --------- select menu shows France Steve -------- 56 --------- select menu shows USA Ali --------27 --------- select menu shows Canada So if Joe changed his country and moved to USA, I can just select USA from the select
Not returning nan for two vars
I've stopped my boxes displaying nan for the top two boxes when letters are entered into them. I when enter in letters into the third box and then a number into box 1. or 2. I get nan. Its probably really easy but I can't work it out? 1.<input type="text" id="first"/> 2.<input type="text" id="second" /> 3.<input type="text" id="third" value="10"/> $(document).ready(function(){ var num = 5; $('#first').keyup(function(){ var firstValue = parseFloat($('#first').val()); var thirdValue = parseFloat($('#third').val());
cache:false ajax jquery...?
Hi Frnds, In my project i make Ajax call to get result form my service, i put cache: false in my ajax call the result is not cachen in browser, My question is, 1) First the result is cache in browser(Client) or Server. 2) The proxy server there in between server and client system in that case what happen is the result is cached in proxy server or not, when the same request came from the client it take the result from the proxy server Instead of server.? 3) Is the proxy server cache the result....?
How to display photos in timeline using jquery and css ?
Hi all, I have to display photos as date wise in html page. Like below -------------------------------------------------------------------------------------------------- | | | 2014 | | | August photos ----------| | | --------- July photos | |
Using node js & jQuery to get DOM object
Hi guys, I'm trying to monitor the contests offered by Draftkings to keep people up to date on their latest offerings on my fantasy football site. To do that, I need to capture data from the DraftKings.com/contest-lobby site. Specifically, in the DOM, their is (what I believe to be) a javascript variable or object named "packagedContests". I believe it is an array of hashes. In other words, you have the primary variable name packagedContests, then you have a child object numbered 0-2000, and each
Next Page