Variable selector not working
I cannot seem to get this variable selector to work.. grr $('button').click(function(){ editCells(); }); var d=0; function editCells() { d++; inputType ='<span id="inDate'+d+'">To be replaced</span><input type="hidden" id="inDatepicker'+d+'" />'; createDatpicker(d); $("#dialogue").append(inputType); } function createDatpicker(n) { $("#inDate"+n).text('date'); console.log("#inDate"+n); } http://jsfiddle.net/bcraig/jb755/1/
Combining checkbox selectors for unique results in jQuery
I have 3 checkboxes, and I want all combinations (about 8 or 9) of those checkboxes to display a different result, but I cannot work out how to do so. It feels like there's a simple way of doing this that I'm missing. Here's the Frankenstein monster-code I have so far, which doesn't do what I'd like it to. The aim is that the following code sees that a user has has checked both the "webcam" (#checkWebcam) and "chat" (#checkChat) boxes, and that a different download link is being displayed based on
Grouping shape objects
Ok, I'm able to select multiple shape objects on the ui canvas, but then how do I group the selected shape objects? (Image of the selected shape objects)
AJAX - Going to other page and passing only data and remain there
I'm in a small trouble. Ehm how can i call next page passing data with ajax? Here's the code : $.ajax({ type: 'POST', url: "collaboratori.php", data: str_param, }); How can i call the page collaboratori.php passing str_param and go to collaboratori.php page? First ajax call and pass data to salvamod001.php page and then return a result. But in the second ajax call i want go to next page passing data and go there! Thanks very much Cris
Can't post to popup, sized page
I can use standard form/post/action to a new page but I am trying to do a window.open function but if I use: <form method="POST" action="javascript:window.open('newtest56o.php','','height=480,width=640')"> I get sized popup window but no passed info from post If I use: <FORM onsubmit="window.open("newtest56o.php",'Popup','width=400,height=500')" action="newtest56o.php" method="post" target="Popup"> I get 2nd full size tabbed window with the info I needed. I want popup small window that is focused,
for each problem
jQuery 1.8.3 this one works... just for i <dt> var t = $('[isActiv="False"]'); $(t).parents('td:first').addClass('bg'); but that fails: $.each('.lst tr td span [isActiv="False"]'), function () { $(this).parents('td:first').addClass('bg'); } Line: 611 Error: Unable to get property 'call' of undefined or null reference
Simple append and remove excercise not working
I am trying to create a small code of making a list , when user put in the value in the input box and click on add, it should add the item to the list , I have figured that part out , but my problem is i can't remove them. you can see the code here http://jsfiddle.net/direcode/HxPb7/155/ Please let me know what am I doing wrong.... Thanks Dire
How can i build a matrix object?
hi, i have the following object structure: { "Color": {name: "Color", values: ["red", "blue", "green"], "Size": {name: "Size", values: ["S", "M", "L"], .... } now i have to build a "matrix" and need the following result: Color red, Size S, Color red, Size M, Color red, Size L, Color blue, Size S, Color blue, Size M, .... how can i build that? greetings
jQuery click function issue
I know this is caused by: jQuery(document).click(function(){ but, when I try to replace this with anythiung else like: jQuery(document).ready(function(){ for example, it no longer works. As far as i can remember the (document).click fucntion is there completely by accident and yet its needed for it to work properly, what am i missing? jQuery(document).click(function(){ jQuery('.toggle-on').click(function(){ jQuery('.post-info').addClass("post-info-toggle-off"); jQuery(this).addClass("toggle-off");
How to remove duplicate parameter on 2 strings?
I have 2 variable with values and character '&' to determinate parameter (like URL parameter). Note: This is not a parameter from URL and not is a Array, just a string storage on variable! variable1 = "value1=bla&value2=ble&value3=bli&value4=blo&value5=blu" variable2 = "value2=car&value4=yellow&value9=big" I need compare 2 variables and if have same parameter on variable1 and variable2, i need exclude parameter from variable1 and use parameter of variable2. Like this: value1=bla&value2=car&value3=bli&value4=red&value5=blu&value9=big
How to create a circle using jquery ..
This is the code which I am using.. $('#buttons1').resize(function(height) { var fuente = $(this).height() / 2; var margen = (fuente / 2) - 5; $('.contenido').css('font-size', fuente + 'px'); $('.contenido').css('margin-top', margen + 'px'); }); CSS--- #buttons1{ /*buttons1 central*/ background: #F9121E; width: 100px; height: 100px; margin: 50px auto; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%; border:3px solid #000;
using closest, getting the value on clicking a button
Howdy In a table with 3 cols and several rows, I have an int value on the first col and a button on the 2nd and 3rd. On clicking the button it should get the value of the first cell of its respective row and show it on the button. I have been given this here below, but while I understand what it pursues, still not coming on: function change(elem") { $("elem").closest('tr').find('td:first').text(); } </script> and the HTML goes: <tbody> @foreach ($polls
How I make a script like pitchfork.com/features/cover-story/reader/bat-for-lashes/?
Hi, I need to make a website like the example in pitchfork.com/features/cover-story/reader/bat-for-lashes/ Is there any script to do it? Same efect than the website... (text and images change as you scroll down) Thanks, Francisco
How to fade out and in a Div in a relation with scrolling
is there a way where I can make a fixed Div fade out when I Scroll the Page down and fade it in when I scroll back up for this Website in The link bellow : this is the link <div class="BodyContainer"> <p class="Slogo">Live Like You are In Heaven</p> <div class="SubSContain"> <p class="SubSlogo">A Beautiul Life</p> </div> and this is the CSS : .BodyContainer { width:100%; display:block; position:fixed; z-index: 1;} Please help !! I asked may times but no one is answering !
Validate and JSON
I looked at the reference for the "remote" option with validate. The docs aren't too clear as to how the JSON response must look. Does anyone have any examples? When I look at the demo, it seems to only return an image. Perhaps I'm checking it the wrong way. I'm using the network option in the inspector of Chrome.
Displaying Arrays from set index.
Hi, if I have the following code: <br /> <script> nme = [1,3,4,1,8, 7]; alert(nme); </script>The alert box displays - 1,3,4,1,8,7. Is it possible to have the alert box display without the first array being shown so it would just show 3,4,1,8,7? Thanks in advance.
Animate Scroll Path In Canvas
Hi All, first see this http://joelb.me/scrollpath now I made this canvas for my own <canvas id="myCanvas" width="5000" height="5000"></canvas> <script> var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); context.beginPath(); context.moveTo(100, 100); // line 1 context.lineTo(500, 100); // quadratic curve context.bezierCurveTo(1000, 100, 500, 800, 1000, 800); //Line 2
How to evaluate a div from a string which is inside .get function
I evaluate a sting like that "<!DOCTYPE html>\r\n\r\n<html ... </body>\r\n\r\n</html>" inside $.get function. I want to evaluate a div inside it. I tryed that didn't work: var divHtml = $(data).find("#comments-comments").html(); // data is the string above. How can I evaluate the divs I want from a string like that? Thanks.
Show image for a second or two
Is it possible to show some text/image for a short moment (1-2 sec) and then to hide after this time? I guess it should be preaty easy, but I can't find that one :/
Having problem with a Jquery script. It doesnt work on a certain drupal template but works fine on other template.
Hi good day. Im developing a drupal website, and for some reason, im just unable to get this jquery script work. The script basically gets several youtube URL's and gets the video's name, and preview image directly from yt. http://geckohub.com/jquery/youtubeplaylist/ this is how its supposed to work. unfortunately, im unable to make it work on my theme. http://egemsoft.org/despertarfinal/ The videos just wont work. The links send you to the video. It doesnt work on like the demo. I have tried with
Add Two Numbers from Input Number Fields
Hi all, I am trying to add two numbers together and output them using jQuery. My input types are set to "number" and need to stay that way. I have tried the following, but get a result of NaN: <input type="number" id="primaryincome" class="form-control" placeholder="0"> <input type="number" id="otherincome" class="form-control" placeholder="0"> <input type="number" id="totalamountremaining" class="form-control" placeholder="0" readonly> var primaryincome = $("#primaryincome").val(); var otherincome
Trouble trying to simplify my code...
Hey there, I wrote a code that is quite long for it's purpose, that it does is hides all the divs with the class: div1, div2....div7 and fades the in when click the link with class: link1, link2....link7...and my code fot this is: $(document).ready(function() { $(".div1, .div2, .div3, .div4, .div5, .div6, .div7").hide(); $(".link1, .link2, .link3, .link4, .link5, .link6, .link7").bind("click", function () { $(".div1, .div2, .div3, .div4, .div5, .div6, .div7").fadeOut();
problem with a caption script
Hello, I'm a new JQuery user and I've got a problem with a little caption script I use for the web site of my parents in-law : djpgirardin.com At the third image of the carroussel, the css bottom property isn't high enough but is the same of all the other ones. I don't understand why my script don't process each div... my script : $(document).ready(function() { $(".information").each(function(){ $(this).css("bottom", $(this).innerHeight() + "px"); }); $("#cycle").hover(function(){
Object height and position change on window when scrolling document
Hello, I have a fixed object which is let's say at original-top : '50px' (from document top) and original-height : '10px'. I would like that when scrolling down the document, the object scrolls to down as well and it grows its height in the meantime. So when we arrive at the bottom of the document, the object stops at finish-bottom : '80px' from the window/document bottom and height stops at finish-height : '100px' of height. And back way, when we scroll upto the document top, it finishes at 'top
event.pageX and event.pageY not working on iframe correctley
Hi All I want to do is to show a popup which appears when the user hovers a part of an image. I do it like this: <!Doctype html> <html> <head> <title>Wir feiern die Wirtschaft der Zukunft</title> <link rel="stylesheet" type="text/css" href="style.css"> <script src="http://code.jquery.com/jquery-1.9.0.js"></script> </head> <body> </div> <div class="container"> <img src="strauss.png" /> <div class="popup"></div> <p> <span>Move the mouse over the img.</span> <span> </span> </p> </div> <script>
using value=variable
how we can use selValue in alue=selValue Correctly var selValue = $("#faal").val(); alert( selValue ); $('input[name=radios][value=selValue]').attr('checked', true);
keyup function does not fire after .html()
Hi all, I have two function checks keyup and keydown on input fields of a division which are placed in document.ready (please see below) The problem is these functions fires without any problems on page load. But does not fire after changing the content of the division (for login and logout) using .html() property. Anybody have an idea how I can fire these functions after the login/logout process? Many thanks telmessos Function is: $(document).ready(function() { //reset previously set border
IE 10 not event not firing bind() or on() using JQuery
$('body').unload(function () { }); $('body').on("beforeunload", function () { //if true Means Logged is Clicked else Page close clicked if (IsTrue == 0) { BTGUI.WebServices.ConnectionToken.GetLogOutClientUserMethod(LogOutClientUserMethodSucess); } else { BTGUI.WebServices.ConnectionToken.PageClosedXmlMethod(hddClient, hddUserName);
jQuery slideDown and slideUp - how to keep statement on page change
I have created a menu which uses jQuery slideDown/slideUp to show/hide menu items. Jquery code looks like $(".menu-reveal a").click(function() { if ($(".menu").is(":visible")) { $(".menu").slideUp(300); $(".menu-reveal").removeClass("revealed"); } else { $(".menu").slideDown(300); $(".menu-reveal").addClass("revealed"); } }); Site is loading by default with "hidden" menu items, then visitor needs to click it to see menu items. My question is how I can "keep" menu statement if was expanded or not
How To Toggle Variable Literal(Value) Using jQuery
Can you please take a look at This Demo and let me know how I can toggle varible value from "ecolo" to "econo" using jQuery? <button id="model">Toggle Query</button> <div id="result"></div> <script> var qtype= "econo"; $("#model").on("click", function () { qtype= "ecolo"; $("#result").html(qtype); }); </script>Thanks
on ul li how not to fire click on children?
on ul li how not to fire click on children.. how to make each tag independent from babbling down events? http://jsfiddle.net/mHP7a/1/ thanks
Scroll div problem
Hi I am learning Jquery, I am trying to scroll div content but is not scrolling which I was expecting Please check my project link http://fltech.in/scrollprob/ rollover on image, and I need it must scroll right to left I am trying to make like this >>> http://www.juliaurban.ru/ru/collection/2014/vesna-leto/
Re: Problem with Account Creation Form executing submit funtion twice
I am relatively new to web design and have a problem with an Account Creation Form submittal. I have listed my code below. I have used Font Awesome to render the icons on the web page. I have used Parsley from http://parsleyjs.org for the form validation which works perfectly. I have used the jQuery Form Plugin from http://malsup.com/jquery/form/ to handle the form functioning. The problem is I receive the Account Creation Form email twice and also the dialogue box alert pop's-up twice. The CSS3
Hello, just want to ask if this is possible?
Hi just wanna ask if this is possible <h2></h2> <p></p> <p></p> <h2></h2> <p></p> <p></p> <p></p> <h2></h2> <p></p> Just want to wrap them with DIV Thanks...
perform animations -> when complete, wait for a click to perform another action, animation repeats. Gurr.
Here is my code snipit $wrapper = $("div.box"); $wrapper.each(function ( i) { var div = $(this); setTimeout(function () { div.fadeIn(800); }, i * 800) }).stop(); $("a.imp").click(function(event){$(this).parents("div").css('z-index','2');return false;}); The loop with the setTimeout function works fine. And when run alone, the click function on the link
Console undefined error
Hi I'm getting a console is undefined error in IE8. What is the issue? with my code? function appendIndividualDetails(individualResponse) { var creditscore=false; for (var i = 0; i < individualResponse.length; i++) { if (individualResponse[i].hasOwnProperty('value')) { console.log(individualResponse[i].tag); if(individualResponse[i].tag=="SCORE") { jQuery("#input_24_65").val(individualResponse[i].value);
My draggable function has broken
Hi! I had a draggable function and it was working nicely. But when I add NO-2 function, my draggabe function and my close button(button which included the div) broke down. Need help. HTML codes: <div id="draggable" class="yeniyorum_div"> <div class="yeniyorum_baslik"> <span class="basliktext">Yeni yorum oluştur</span> <button class="closebutton" type="button" id="hideshow" >×</button> </div> <form method="POST" action="javascript:void(0);" class="yorumform"> <textarea name="yazilan_mesaj"
inArray() behaving badly for me please.
I can make and array as displayed in the alert, but when i try to use inArray to identify an item in the array it doesn't see it and gives back -1. What am I missing? thank you. jsfiddle: http://jsfiddle.net/vhabhsrosed/QG8YU/ jquery: $(document).ready(function () { var newArr = []; var xtext = $("i"); $(xtext).each(function (index) { newArr.push($(this).text()) }); alert(newArr); if (jQuery.inArray("Other IRB Site", newArr) != -1) { alert("jjjj");
Issue on Adding Animation to jQuery toggleClass()
Can you please take a look at This Demo and let me know how I can add Animation / Speed or Duration to the following code $("#ecolomodel").on("click",function(){ $("#ecolomodelno").toggleClass("switchshow switchhiden"); $("#ecolomodelyes").toggleClass("switchhiden switchshow"); });using this mark up <div class="panel panel-default"> <div class="panel-heading">Switch</div> <div class="panel-body"> <div class="row"> <div class="switch col-lg-offset-1 col-md-offset-1
Modify ajax request
Hi, I am not sure if this is possible but thought I'd ask. Essentially I want to modify the jQuery.ajax.data property after the event has been triggered but before the request is sent?. The reason I ask is because I am using jquery-ui autocomplete on a number of fields on a page and the data parameter will need to be modified depending on which input triggered the request, EG if the input field had the name 'code', data would 'code=' + req.term, if the input name is 'name', data would be 'name='
Next Page