thumnail images not fadetoggling but enlarging to original size
Hi I have just started learning jquery so please help me out here. I have a group of images under div's eg.2012images,2013images etc, all these div's are wrapped in a wrapper displayed as thumbnails at the bottom of the page. What I want is when the user clicks on 2012images ,these images should all display in the center of the page as a large image as a FadeToggle and stop at last image. I have written the code as such: <style> .enlarge{ width:75px; height:75px; position:absolute;
Unable to select right radio button
i want to select a radio button by its class and its value. As value of some groups have same value they are zerod to same option button. code am using: if($("input[value='<%=ans[i]%>']").hasClass("q<%=i%>")){ $("input[value='<%=ans[i]%>']").prop("checked",true)
what are the major differences between filter() and find() methods?
i know how to use them but iam a bit confused about thier priorities and differenences between them? and which wchould be used in which case?
confusion in selectors....
$("p span:first").css("background-color","yellow"); this means select every first 'span' element in 'p' elements....but why its only selecting just first 'span' of first 'p' element?
code from Jquery cookbook help- number input validation
I used this code from the jquery cookbook. It works too well in a sense. It does not accept any invalid input. However, I would like to give some feedback- a text message next to the box when they enter invalid code. I wanted to .after a span text warning but can't seem to find a good place to include in this code. Any help would be appreciated. $('.onlyNumbers').bind('keydown', function(event){ // keyCode for the key pressed var keyCode = event.which;
Change <img> tag using .prop
Hello Everyone, I am not sure what is wrong with this code but I would like to know so that I can continue to learn. What I am trying to do is to change the <img> tag attributes using jQuery when the css stylesheets change at break points with media queries. So the css sheet changes and at the same time I wast jQuery to change the <img> tag attributes. Here is the jQuery code: The starting size of .content is 467 but when the stylesheet changes at a media query break point the new size of .content
Show hide divs based on radio selection
$(function() { $("input[name='cst']").change(function(){ var ChoiceSelected = $("input[name='cst']").val; window.alert(ChoiceSelected); if (ChoiceSelected === 'CourseName') { $('#CourseChoiceName').addClass('show').removeClass('hide'); $('#CourseChoiceNumber').addClass('hide').removeClass('show'); } else (ChoiceSelected === 'CourseID') {
Deep jQuery.extend modifies the target's protype?
After running the following code, parent.deep.y returns "baz" even though parent is the prototype of the target. var parent = { deep: { x: "foo", y: "bar"} } var target = Object.create(parent); var source = { deep: { y: "baz" } }; $.extend(true, target, source); I expected parent.deep.y to retain it value of "bar". Can someone please explain why is it that a deep $.extend modifies the protoype of the target?
Can someone please help me clear my doubts?
Greetings Experts, I have this script: <script type="text/javascript"> function CallService() { //Creating an object to hold token form field myToken = new Object(); myToken.Token = $("#token").val(); //Creating an object to hold form fields myData = new Object(); // Creating variables to hold data from textboxes. First building associated details myData.Address = $("#Address").val(); myData.CallerAcctNum = $("#CallerAcctNum").val(); myData.CallerAddress = $("#CallerAddress").val();
On Jquery 2.1 ajaxStart is not firing
I have a ASP.NET MVC 4 where I've used Jquery 1.8.2 and on many pages I use Ajax and I have add this source toi show a wait image when Ajax is running .. <script type="text/javascript"> $(function () { $("#busydiv").ajaxStart(function () { $(this).show(); }).ajaxStop(function () { $(this).hide(); }); }); </script> Now I use Jquery 2.1.0 and this not run... Any suggests ?
DatePicker Default Date
Hi all I have two datepicker objects on my page to represent arrival and departure dates. The Arrival Date picker is set to be a default date which comes from the database (its a dynamic event date that changes depending on which event we are looking at). Everything works fine however I have discovered that if the event date lands on the 1st of the month, the user cannot select a previous date. How can I get round this issue as I believe I have to use MINDATE parameter in order to set the default
Drop not rejecting invalid elements
Hello, Im using the jquery ui drag and drop. The accept doesnt appear to be working. It's not even working in the jquery ui demo. Ive tried in Chrome, FF and IE Thanx
Why does the position of my buttons mess up when i use animate on hover?
I am creating a hover effect where in when I hover over a div, there is an Overlay(Show) and i display a hidden "SHOP NOW" along with an "Arrow" whilst animating their position. When we hover normally, everything appears fine but on performing haphazard hover over the div, the position of my Call to Action elements get messed up. I am attaching a JSfiddle of the same. I have tried adding .stop() but it does not seem to be helping. http://jsfiddle.net/ys4U2/1/ Please help me how to fix this. Should
How can I get the value/text of a dragged element?
Hello, Im dragging an <a> text element into an input field and dropping it. How can I get the text/value of the element Im dragging and populate an input text box with it's text? Thanx
Change background on expand or collapse
Hi, I want to change an expand / collapse feature that existed on my site, I would like a simple and similar operation, but for now I get nothing. Before it is a picture that I change the name of the current source, I would do exactly the same thing but that alternates the background-image. Here is my current code and the code comment is that before, I would arrive at the same thing in a similar way: $.fn.expandCollapse = function() { $(this).click(function(){ $(this).parent().find('.content').slideToggle("fast");
How to loop through JSON GET result?
hi, i want to consume a JSON Webservice which return the following: {"GetDataResult":[{"firstname":"firstname1","lastname":"lastname1"},{"firstname":"firstname2","lastname":"lastname2"}]} I want to loop through the data and put it for example in an HTML Table. I tried the following: $(document).ready(function () { var JSONService = "/_vti_bin/JSONWebService/Service1.svc/GetData/ae"; $.ajax({ type: "GET", contentType: "application/json",
scrollTop: is not working in chrome?
http://sabithacreations.com/ in this site i used var about = $('.about'); var aboutScroll = $('.abt_part').position().top + $('.show_icons').position().top ; about.click( function(){ $('html').animate({scrollTop: aboutScroll },'slow'); return false; }) in mozilla its working as i intended but not in chrome...pls help
Implementing Autocomplete on a dropdown
I want to use the jQuery Autocomplete but the standard textbox won't work for me. When a user selects something from the autocomplete, I need to be able to reference an ID so I can pass the ID to a details page so that it can query all the information correctly. I figured using Autocomplete on a dropdown would work work better since I can set the ID in the value. I just don't know how to accomplish this with the autocomplete since it only references one variable in the array.
How to add a row to an html table between two rows
Hi, i have an html table with n rows. Each row has an + icon. When the user klıcks on the + icon i need to add new rows to the table after the current one where the user has clicks on the icon. Is it possible to do this via jquery and if yes how can i achieve this? Regards Yavuz
how can i add a different calls to each row ?
hello. i am trying to add a different class to each row so that i can set a different equal height for each row. for example row1 row1 row1 row2 row2 row2 row3 row3 row3 i have tried the following but its not working how i want it to. i would rather it so that the first 3 have a class of row1 then the next 3 have a class of row 2 etc... this is my list of 12 divs <div class="box-grid"> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div>
Show checkbox on hover over
I have a table which has rows that has one column in which data is displayed as link and in another column of that row,i have a checkbox .I am looking for a jquery in which on hover over link,the check box is displayed and then i can check the checkbox to perform action. <td> <span id="hoverspan"><s:a href="#" onclick="DisplaySelectedPart('%{#stat.index+1}')" ><s:label id="internalNumber" value="%{internalNumber}" /></s:a></span> <span id="chkdel"><s:checkbox name="selectBox" value="checked" onclick="DeleteSelectedPart('%{#stat.index+1}')"
Text color change in Jquery
Hi, i have a text need to change text color as red it should be there upto 4 seconds and it should go to black color for 10 sec again it should come red etc. Let me know how to proceed with this in Jquery.
Autocomplete Issue
Greetings people, i'm giving my best to create proper autocomplete function. But guess what, i'm stuck. I've managed to create JSON array which gives output like this: [{"label":"$name","id":"$id","name":"$name"} Now i need jquery function that will fill these fields after i search for name in <input name="name"> so id will be hidden field and it should be filled with $id when i select $name in name. guess html should look like: <input type="hidden" name="id"><input name="name"> Hope you understood
Text Color change in Jquery for gif image
Hi, I am having below gif images below that some text is there for every image. when ever red highlighted text also should highlight as red for appropriate image. <div class="twelve columns" id="show"> <div class="three columns"> <p id="cartton1">A train ride goes bad because of unexpected illness.</p> </div> <div class="three columns"> <p id="cartton2">Shouldn’t healthcare be available everywhere?</p> </div> <div class="three columns">
how to wait for tracking request to finish
I have 2 links on my page link1 - displays an video player overlay when clicked but for SEO support Search engines would follow the link to a video detail page (video1.htm). <a href="video1.htm" onclick="watchVideo(1);return false;">watch video</a> link 2 - redirects the browser to the home page <a href="home.htm">return home</a> I'm attaching a click event for tracking to every link $(document).on("click", "a", track); in the track() function I'm making an asynchronous request to an image for tracking
Save content of div for paging back without loading the content again
Hi together, I’m trying to save the content from a div to a javascript variable before loading new content to the div. The goal is that I get the whole content of a previous page with all user entries and several jquery UI Widgets to the div without loading the data from the server again. I’m trying to solve the problem with jQuery clone, but I have several problems with the jquery UI Widgets und jqGrid. Here is my first try: test.html <script type="text/javascript"> var currentPage = 0; var url
jQuery code does not execute when page runs
Hi all, I am working on a responsive CMS site and partly utilizing jQuery to re-position elements depending on the browser size. I am using media queries to detect the browser size and add a class to the body depending on that result. I then use jQuery to move elements depending on what class is on the body tag. The below code is my attempt at doing so, but it will not work. I do get "ready" in the console, so I know it is entering the .ready function. Also, I tried to add an else statement at the
mastercard.us template
hey guyz . can someone help me i need a template that looks just like this . mastercard.us
Question about cross-domain ajax
Hello, Im calling an ajax program through the $.ajax method. The ajax program is within the the same domain, but attempts communication with the paypal server. A cross-domain call. Would this be considered a cross-domain call? Should I be calling the same-domain program with the jsonp data-type? Im getting a apache 500 error but cant determine why. Both program are terminating normally. And I can prove it ...
Post Back possabilities
My form asks the user to check "I agree: terms and conditions", where t & c links to a page with the full text. At the bottom of the text is a button that says "Agree". I want the user to click "Agree" and be returned to the login page with "I agree" checked. How do I do that in my php environment using jQuery?
Dynamic Contextmenu using JQGRID
Hi Friends, I am working on a task, where I have to create a dynamic contextmenu and dynamic subcontext menu. all I am getting from the back end is a JSON response. I was successful with creating a dynamic context menu, but having troubles with creating dynamic context menu. any one can help me here? I am using JqGrid. here is the JS part function loadDxGrid() { $(gridId.dx).jqGrid({ data : jqGridJsonResponse.dx, colNames : diagnosisColNames, colModel : diagnosisColModel, jsonReader : { id : 'rowId',
Javascript/jquery Core Books?
Hi, sorry I know this is not a regular question for this forum. I thought though since most of the people on here use javascript/jQuery you might know of some really good resources for understanding Javascript itself. I've got a few books, but they tend to be more of a developers crash course of what they consider the basics. In that they always seem like they're not talking about the foundation or core components that comprise javascript. I was wondering if anyone knows of some really good, indepth
Getting progress of PHP script called by jQuery post
I want to periodically check the status of a php script and display it on the browser. Here is the jQuery that is used to post. $(document).ready(function() { $("#tempbut").click(function(event){ $('#loader').show(); $('#mainarea').hide('fast'); $.post( "template.php", { guide : $('#guide').val(), title : $('#title').val() }, function(data)
How to getting id of the button in beforeclose in jquery popup
My jsfiddle popup have 2 buttons(text1 and text2). When clicking text1 button, I want to getting this text1 button Id in inside of before close method.Is it possible? Currently it is getting dialog popup id in alert in beforeclose method. My fiddle link : http://jsfiddle.net/eLw5V/4/
Collapse all fields on jQuery accordion?
Hi Everyone, I have a basic jQuery accordion on a website, but I would like to know how to have all the fields collapsed when someone enters the page instead of the first one being open. Can anyone show me the right function or script to do that please. I am very unfamiliar with jQuery language so could you please show me how it would go in my script, which is below. Thank you very much. <script type="text/javascript"> $(document).ready(function() { // Accordion $("#accordion").accordion({ header:
Please be kind to help me
can anyone change numbers to image from this code, i found it on this site http://www.elated.com/articles/drag-and-drop-with-jquery-your-essential-guide/
ReferenceError: launchWindow is not defined
This is a modified version of a script I found on the web earlier on. It works great up until I try and invoke the use of another HTML file (content.html), at which point it errors as in the title. It also gives the same error if you move the "'content.html ' + " from line 9 to line 34. No such error occurs if you just try and load an element in the same HTML file. No such error occurs when using .load() with essentially the same code. What gives? Help appreicated! --- $(document).ready(function()
How do I assign an change to a hidden field.
Hello, I wish to assign a change event to a hidden field that is being changed through a click event that is 3rd party software. I cant change the 3rd party software. The change event to the hidden field is not firing How can I get it to recognize the change event and fire.
$.extend to merge objects
I have an object like this: config = { options: [['Option1'], ['Option2', 'Option3', 'Option4'], ['Option5', 'Option6']] }; I then have an html element with a data attribute like this: data-extraoptions="[['Option7','Option8','Option9'],['Option10','Option11']" How can I convert data-extraoptions into an object and then merge into my config variable? I've tried just using a comma delimited string in data-extraoptions and using the split function, then using $.extend(true, config, [extraOptions]);,
What is the future of jQuery?
I wrote down my thoughts here: https://tech.bellycard.com/blog/the-future-of-jquery/ What do you guys think is the future of jQuery?
Next Page