Jquery Mergely() Function not defined
Hi , I tried using Mergely plugin to find the difference between 2 strings but I am getting the error as jQuery(...).mergely is not a function . Can some one help me how to resolve this ? Here is the code snippet for the same <html> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <script type="text/javascript" src="https://mergely.com/mergely-3.3.9/lib/codemirror.css"></script> <script type="text/javascript" src="https://mergely.com/mergely-3.3.9/lib/mergely.min.js"></script>
Why is jquery ajax 10 milliseconds slower than manual parse?
I have a question about functionality. I am writing a web app and I want it to be as responsive as possible to the user. When I do an ajax request with dataType:'json' it takes 10ms longer before the success handler is called than if I do dataType:'text' and then do a manual jQuery.parseJSON(); With json parsing before handler is called it takes my request 21-25ms to parse some arbitary json With plain text fetching and manual parsing with jQuery.parseJSON its 11-16ms for the same job. I'm just curious
CHANGE STATUS OF BUTTON WITH CLICK
My problem is that: i have two buttons button1, button2 I must see only one,when i click button1, i want to see button2 at the same place and when i click button2 i want to see button1. How can i do that in jquery?
gallery with background images on body and previous next buttons
Hello, I am trying to create a gallery with prev/next buttons for background images on the body tag. The images are in an array and called by index. I can't call the first image and my buttons stop working at img 3 Any help would be highly appreciated. I also created a fiddle here var Images = ['bg_01, bg_02', 'bg_03', 'bg_04', 'bg_05', 'bg_06', 'bg_07', 'bg_08', 'bg_09', 'bg_10', 'bg_11', 'bg_12']; var ImgLength = Images.length; $("body").css("background-image", "url(../img/" + Images[0] + ".jpg)");
prev() with split siblings
Hi, Could anyone tell me why this doesn't work please? <section class="whatever" /> <section class="whatever" /> <section class="whatever" /> <div></div> <section class="whatever active" /> $('.whatever.active').prev('.whatever') It should return the section before the div but it doesn't seem tofind it , however theoretically are all the sections not all siblings ofthe same parent (in this case the body) I had to use$('.whatever.active').prevAll('.whatever:first'), but Idon't know why (I'm assuming
Jquery image slide to righ and left
Hi i would like to know if there is code for by clicking the next and previous button for batch image let say 4 then i press the symbol of next then other 4 image again will appear
How do I get titles to display INSIDE a Fancybox lightbox with my carouFredSel carousel?
Hello jQuery Forum: I'm new here, hope I'm posting on the correct board. I'lltry to keep it as short and simple as possible. I'm working on a project for a client. I have some thumbnails set upto open in a Fancybox lightbox. I figured out how to get the titles todisplay INSIDE the box. Here is the script I have for that: <script type="text/javascript"> $(document).ready(function(){ $(".fancybox").fancybox({ helpers: { title : { type : 'inside' }, overlay : { showEarly : false } } }); }); </script>
J Query problem where the image slides down but then fades out when i move the mouse. I tried using a delay but it doesn't look as good. Any fixes
J Query: <script src="jquery.js"> </script> <script> $(function() { $("#SeeAllEvents").hide(); var timeoutId; $("#facebook").hover(function() { if (!timeoutId) { timeoutId = window.setTimeout(function() { timeoutId = null; $("#facebook1").stop(true,true).slideDown('10000'); }, 500); } }, function () { if (timeoutId) { window.clearTimeout(timeoutId); timeoutId = null;
$( ) parsing content inside <script> tags incorrectly?
Hi, In my application, I dynamically load content from the server that consists of a mix of <script> and <style> tags returned by a single request. When the content to load includes a <script> tag which contains the string "<foo/>", the script that gets added to the document is being modified by jQuery to contain the string "<foo></foo>". You can see it with the following example: $('<script type="text/javascript">var a="<foo/>";</script>') results in: [<script type="text/javascript">var a="<foo></foo>";</script>]
How to set switchButton from dynamically data constructed ?
Hi, the value global (true or false) was constructed from a json, I don't know how to set the valye of each switchButton in a td, here is the fiddle : http://jsfiddle.net/mlotfi/cddyx4vr/ Thanks.
.click() not working
I'm trying to create a link dynamically and click it. My initial code works, but it uses a deprecated javascript method: var a = document.createElement('a'), ev = document.createEvent("MouseEvents"); a.href = url; a.download = url.slice(url.lastIndexOf('/')+1); ev.initMouseEvent("click", true, false, self, 0, 0, 0, 0, 0, false, false, false, false, 0, null); a.dispatchEvent(ev); But initMouseEvent is deprecated. So I thought I would use the jQuery .click method instead: var a = document.createElement('a'),
How to turn on debugger in chromebook
Hello, Im writing a app for chromebook. How do I turn the debugger on in chromebook? Thank You.
Need help to write text in td
Hi, Need help. I have table (tableA) with single td. (multiple rows) td having checkbox (checked or unchecked.) I create clone of tableA and in that I don't want checkbox. Instead of that I want some text like "checkbox checked" or "checkbox unchecked" On button click what I done so far is: function buttonClick() { //Create clone var t = $('#tableA').clone(true); //remove all href tag in side td $('a', t).filter(function () { return $(this)}).removeAttr("href");
jQuery to move the scroll-bar to start of news-article
Hi guys, I have infinite scroll (Paul Irish) implemented on a news-articles-blog and it is working fine. The structure is like this: 1-full article 1.1-comment box 2-full article 2.1-comment box 3-full article 3.1-comment box etc. When the user has read full article (3) and clicks the "back" button one time then he can read full article (2). However, when the "back" button is clicked one time, my scroll bar moves up to the middle of 1.1-comment box (!!!) instead of moving to the article start (=
switchButton is not working in ie
Hi, I always use chrome, used switchButton in my code working fine, byt was surprised when I load the page in ie 11, it did not show the nice switch Button with ON and OFF, it just show a classic checked checkbox, here is a pic of the inspector in ie and chrome :
Making a Youtube video full screen.
I have code that can make a html video tag full screen, but that code does not succeed with Youtube videos. Youtube videos are embedded in iframes, and the code will maximize the iframe, but it will not maximize the video within the iframe. So you get a black screen that covers your monitor, and in the upper left, you have the video, still the same size that it was. I might guess that I could reload the youtube video once the iframe was maximized, but it did not seem to work. This is my iframe:
Doing math on variable if box is checked...
Hi all, this is my first post here (I think) so I hope I'm in the right area, basically I've wrote a form for a club I'm involved in and I'm trying to add the paypal fees (3.4% + 20p ) to a variable if 'pay by paypal' is checked, this is the jquery bit, I've put the bits I'm interested in, into a JSFiddle Thanks in advance $('.items').click (function () { if ($(this).val() == "champcomp" || $(this).val() == "competitor" ) { var value = "30.00"; } else { var value = "0.00"; } $('#hidd_item1')
field limit for Jquery validator
I've made validation of password field.which will take character between 6 to 16 but this is not working.it does'nt give any validation message. $.validator.addMethod("password",function(value,element){ return this.optional(element) || /^[A-Za-z0-9!@#$%^&*()_]{6,16}$/i.test(value); },"Passwords are 6-16 characters"); // Validate signup form $("#signup").validate({ rules: { email: "required email", username:
appending to non existance selector
hey guys im trying to create a selector in a foreach loop and append to it further down in my code what is the best way to achive this please? $.each(data, function(category, stuff) { $("#categories").append('<li id="category_'+ category +'">' + category + '</li>'); $.each(stuff, function(sub_category, items){ // $('category_' + category).append('<li id="sub_category_'+ sub_category +'">' + sub_category + '</li>'); // here is the error.
google map automatically zooms one out when getting bounds from session
I work on a google map where I try to make the map remember the bounds when refreshing. In order to remember the coordinates, I use the following procedure. The function that saves the bounds. function saveKoordinates(bounds) { try{ urlCall = libraryRoot+"/jscalls/rememberBounds.php?type=koordinates&sw="+bounds.getSouthWest()+"&ne="+bounds.getNorthEast()+"¢er="+bounds.getCenter()+"&zoom="+map.getZoom(); $.getJSON(urlCall, function(data){ }); } catch(err) { console.log(err); } } The ajax file
jQuery animate right to left not working.
I am trying to animate an element behind a UL so that when a list element is clicked, the width of the element animates left to right to encompass the list and then readjusts to its original width. I am able to get it working for the left to right animate, but when i try to reset the Right offset to 0, it does no longer animate[from right to left]. Can someone have a look into this. Here is the link to fiddle. http://jsfiddle.net/newbie_ready_to_learn/ndme18t4/14/
Hiding text after asp.net form post submit
The following is some code I am playing around with to see if I can hide some text after an asp.net form post. I stripped out a bunch of stuff but you should get the picture. The button works but the submit does not. Does jQuery play well with asp.net? < script > $(document).ready( function () { $("button").click(function () {
$("#test").hide();
});
});
</script>
------------------------------------------------
<script>
$(document).ready(function () {
$("form").submit(function () {
$("#test").hide();
});
});
Unable to load JSON file using getJSON method
Here's my code $(document).ready(function(){ $.getJSON( "testJSON2.json", function(json){ $.each(json, function(key,value){ $("div").append( value.id ); }); }); }); testJSON2.json contents : { "p1" : {"id": "whatever", "name": "start", } } I am not sure where I am doing it wrong. I have
Jquery validator
I have done jquery validator on submit button..but how to make jquery validation on normal HTML button,which will avoid form submission till form validate <html> <head> <title>Display Data In Database Using CodeIgniter</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> $(document).ready(function(){ }); function getdata() { alert("ok"); var grade_id =1; $.ajax({ type: "POST",
Understanding $.ajax converters
Hi, I'm not sure if I understood well what converters actually do. Here's an explanation from http://api.jquery.com/jquery.ajax/ : converters (default: {"* text": window.String, "text html": true, "text json": jQuery.parseJSON, "text xml": jQuery.parseXML}) Type: PlainObject An object containing dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response. (version added: 1.5) Concretely: converters: {
Cloning a div only half-working.
Hi, I have stumbled into a problem when cloning a div. What I want to achieve is a list of a cloned div that can output the id on a button click. Then the user can reset it where it is cloned again, but it is on the latter I have the problem. I have attached a DEMO : https://jsfiddle.net/a4poster/6oe4mgje/ The first part run fines, when you click first time it works fine but if you press 'empty again' the list is rebuilt but the is no output when you click on a item? Can anyone help me, thanks in
Obligatory scroll
Hello word ! I have question with the function ScrollTop. I have 5 div and I want to force the scroll to the next div. But i can not ! JQUERY : $(document).ready(function(){ var heightSize= $(window).height(); $("#header, #bloc1, #bloc2, #bloc3, #bloc4") .css({ "height" : heightSize, }) $(window).scroll(function () { $("html:not(:animated), body:not(:animated)").animate({ scrollTop: heightSize }) }); }) HTML : <div id="header">
How to make functions run after ajax loop is completed
I work on a google map where information about vehicles is loaded via ajax when the page is loaded. This means that all relevant information about the vehicles is stored locally in a jquery container and updated every 30 seconds. Unfortunately I have discovered that if many devices are loaded some other functions are called before they are all loaded which gives null pointer exceptions. what is the smartest way not to make the other functions run until after the the above mentioned ajax call has
distinct array
hey guys...im trying to get a list of all categoryies from an array (below). the result im trying to get is: Footwear, Clothes but not: Footwear, Clothes, Footwear, Clothes the array below could contain 100's or even 1000's of items so a foreach loop would be too slow to get the categories feature in the array. is there a easy solution to get the results im after please...thank you var items = [{ "title": "Nike air MAX", "distance": "5 Miles", "end_timestamp": "2010-12-15 21:51:45",
problem with animate
Hi, this is my first time using jquery and I'm having problems with an animation. Basically I have a div with a background image, and when the mouse is over the "parent" <a> the div resizes so the text behind the layer displays. And it kinda works, but when I move the pointer over the middle of the element the animation goes "crazy", and goes up and down until mouseover. So yeah, Im stuck on this one... Please take a look at http://test.lundbeckconsulting.no/ContentBox/default.html and tell me what
create a select all checkbox for every three checkboxes
i display many chackboxes organized in three columns in my razor view and i want to create a select all checkbox for every three checkboxes (every row): <table> <tr> @{ int cnt = 0; string sr =null; string j = null; string k = null; List<Security.Models.AssignedRolesVM> Roles = ViewBag.tp_role; foreach (var role in Roles) {
HTML 4 - Audio Controls
Hi there, Sadly I have to build eLearning for a client still on IE6. The page requires audio. I have used the embed tag for embedding audio. I want to build custom play/pause button, rewind button and progress slider. I have managed to create the play/pause buttons. Is there any way I can know if the audio has finished playing or reached the end so I can toggle the pause button? Can I rewind the audio? Can I know the current time and total time to create the progress slider? Thanks in advance.
jQuery help
Hi, can anyone tell me why the alert is not firing in this jsFiddle example. http://jsfiddle.net/164emnq7/1/ Thanks.
Loading data from server side file into a java variable for plotting
I want to load data for Chart.js for plotting. My data is created in a directory on the server side. Name of my file = myFile.json. Based on my trials and the documentation I read, the following works for me pretty well. <script> var myData; $.get("myFile.json", function(data){ alert(data); myData = data; }); // ---- This didn't work for same asynchronous reasons --- alert(myData); //Send the data to chart.js var pieData = eval("[" + myData + "']"); // Command
Horizon jQuery Tabs?
I'm looking for a more organized way to list states and cities. I would like to have 25 states listed stacked on top of another 25 states and when you click one, a gray bar drops down to show a list of cities for that state. Anyone seen anything like this I could use? For example:
move content
This is a very simple jquery move that has me stumped. With a source view one can click on both js scripts and see the path is right. I have tried different jquery & general.js scripts, initial.php is in the same folder. http://www.lplc.co/cont.html general.js $(document).ready(function() { $('#content').load('initial.php'); }); $('a').click(function() { var page = $(this).attr('href'); $("#content").load(page); return false; })
Ayuda: Envio por Post en una tabla dinámica.
Hola Amigos. Me estoy complicando la vida hace unos días para enviar de forma correcta principalmente 2 variables ("cant_prod" y "infoProd") por $_POST en una tabla dinámica. Ojalá pueda resolverse con Jquery. ¿Alguna idea?, por favor. Este es mi código y no logro hacerla funcionar: <form action="/lista-productos-pedido" method="post"> <div class="contenedor_tabla"> <div class="alturaTabla"> <table class="fancyTable" id="table_3columnas_fixed"
Processing AJAX request.done data
As part of a case statement "Execute Query" I want to add code to use two radio buttons to select a type of query. One to select "Player" info and the other to select "Future" info. Once a choice is selected a flag will be set to pass on to the function "getQuery(query); " Problem is all the code beginning with var str="<input... and ending with the function "function doquery(querytype)" is skipped. Appreciate help to make this work. (I'm thinking maybe I'll have to have two case statements Execute
Detect Input changes jQuery
Hi, What is the best way to detect changes in a input box? I have tried this but it doesn't work. $(":input").on("DOMSubtreeModified", function() { run code }); Any help will be appreciated. Thanks
getJSON and twitter
Hi, i have a question, im sorry if this is something stupid but im kind of getting crazy so i ask your help :) Im trying to connect to twitter api to get some tweets, here what i did : (function(){ var Twitter = { init:function(){ this.url = 'https://twitter.com/search?q=pekiti&callback=?'; this.fetch(); }, fetch: function(){ $.getJSON(this.url, function(data){ console.log(data); }); } };
Next Page