Search Results

Search found 23364 results on 935 pages for 'jquery ui droppable'.

Page 66/935 | < Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >

  • Quick help with some jQuery toggle

    - by mplacona
    I have the following code: <script> $(document).ready(function() { $('.toggle_section').click(function(e){ parent = $(e.target).closest("div") objChild = parent.children('div'); $('.sectionContentId').hide(400); $(objChild).toggle(400); }); }); </script> <br /> <div class="box" id="parent_section_1"> <strong> <a class="toggle_section" href="javascript:;">New Section 1</a> </strong> <div class="sectionContentId" id="section_1" style="display: none"> <br /> Contents<br />for<br />section<br />1 </div> </div> <br /> <div class="box" id="parent_section_2"> <strong> <a class="toggle_section" href="javascript:;">New Section 2</a> </strong> <div class="sectionContentId" id="section_2" style="display: none"> <br /> Contents<br />for<br />section<br />2 </div> </div> And example can be seen here As you can see, what I'm trying to accomplish is that when you click on one of the links, all the other "already expanded sections" collapse, and the clicked section expand. this works fine as it is, but obviously by using the logic: $('.sectionContentId').hide(400); $(objChild).toggle(400); When I click one of the expanded sections in the attempt to close it, it closes briefly and opens again. I wanna keep the same functionality, but wanna be able to open and close a section by clicking on a link, as well as when I'm opening a section, I wan't it to close everything before opening this new section. I'm not sure I'm being very clear here, but by looking at the example, you will be able to understand better what I mean. Thnks in advance

    Read the article

  • How to cancel/abort jquery ajax request

    - by user556673
    I've an ajax request which will happen in every 5 seconds. But the problem is before the ajax request if the previous request is not completed I've to abort that request and make a new request. My code is something like this, how to resolve this issue? $(document).ready( var fn = function(){ $.ajax({ url: 'ajax/progress.ftl', success: function(data) { //do something } }); }; var interval = setInterval(fn, 500); ); Thank you.

    Read the article

  • jQuery selector to identify a div by its size

    - by Anton
    I have few nested DIVs at page. I want to add event only for smalest DIV which size is more than 100x100 px. I am able to do it using conditions in code. Is it possible to do using selector? $('?????').click(function (e) { } If yes, please provide an example.

    Read the article

  • jQuery Equal Height Divs

    - by griegs
    If i have the following harkup; <div> <div> <div id='sameHeight'>One<br>two<br>three</div> <div id='sameHeight'>four</div> <div id='sameHeight'>five</div> <div> <div> <div id='sameHeight'>four</div> <div id='sameHeight'>six</div> <div id='sameHeight'>seven<br>eight</div> <div> </div> How can I ensure that all divs marked as "sameHeight" are the same height as their counterparts in the other div? I had a look at equalHeights plugin but that assumes all divs side by side are in the same parent. I need one that can either traverse parents or allow me to specify parents. Is there such a thing or do I need to write it?

    Read the article

  • Experiences with UI Automation and WPF

    - by soren.enemaerke
    We are developing a rather large WPF based application and would like to include some automated UI testing in our test suite (which already contains a number of unit tests). The UI Automation Framework from Microsoft partly sounds like a perfect fit for programatically launching and interacting with the application in a test setup. However, I've struggled to find solid references for samples and experiences with the technology, the articles and small samples available on MSDN is not enough to convince me that it is a solid choice. So, does anybody have real world experiences using the UI Automation Framework in their test suite? What are the caveats and the gotchas? Any best practices when written tests scripts, can you "record and replay" to a scriptable format, how much should you facilitate the testing from the application, how did you incorporate it in the automatic build? Should we be looking in another direction than the UI Automation Framework? Feel free to post you experiences here or link to some good references I might have missed

    Read the article

  • GLOBAL loading inside each single button with Jquery in ajax calls of asp.net mvc

    - by Ricky
    I have the following scenario: I have a button\link with a image inside like this: <button type="submit" id="myButton" class="button"><img src="../../Content/images/check.png" id="defaultImage" /> SaveData!!!</button> We are OK here! Now what I need to do is: I want on the click that the image change for a loading element that is previously loaded in the page like this: <img id="loadingImage" src="../../Content/images/loader.gif" style="display: none;" alt="loading"/> And then when the load complete turn back the old button image, I ended with this code: function loader() { var $button = $('#myButton'); if (btnState == '1') { $button.find('img').hide(); $button.prepend($('#loadingImage')); $('#loadingImage').css({ 'display': 'inherit' }); btnState = '0'; } else { $button.find('img').hide(); $button.prepend($('#defaultImage')); $('#defaultImage').show(); btnState = '1'; } } This does the trick for ONE SINGLE button(since I pass its ID in the function) but, when I have for example a grid with a button on each line, I found inviable when managing a screen with many buttons do this for each of then. The main question is: How can I make this method general for all buttons/links on one specific class in the page? The goal is: Click a button, get the image and change it and stop(can be manual). I just don't wanna have to Hook ALL buttons.

    Read the article

  • jQuery event.stopPropagation is not working on <a>

    - by HorusKol
    I have the following javascript: $('#ge-display').click(function (event) { window.open('/googleearth/ge-display.php','','scrollbars=yes,menubar=no,height=650,width=1000,resizable=yes,toolbar=yes,location=no,status=no'); event.stopPropagation(); return false; }); the element with id 'ge-display' is a standard link: <a href="/googleearth/ge-display.php" id="ge-display" target="_blank">Load Google Earth Plugin (in a new window)</a> The problem is - when I take out the 'return false;' line from the click event handler, the javascript popup opens, and then another browser window opens - I thought stopPropagation() would prevent the links own click handler? I've also tried stopImmediatePropagation() - but I still need to return false to stop the default behaviour of the link.

    Read the article

  • jQuery - Animation Causes Div Overlap IE7

    - by Norbert
    I have a hidden div (#contactArea) above another div. When I click the link, the #contactArea opens up. When I click it again, it closes back up. It all works nicely, except in IE7. The two divs are transparent, so they overlap. I have no idea why this happens, or why doesn't it happen on other browsers. It just about feels like IE7 is right on this one. Any way to fix this? $(document).ready(function(){ $("#contactArea").css('display', 'none'); $("a.contact").toggle(function() { $("#contactArea").animate({height: "show"}, 1500, "easeOutBounce"); }, function() { $("#contactArea").animate({height: "hide"}, 1500, "easeOutBounce"); }); });

    Read the article

  • Jquery retrieve values of Dynamically created elements

    - by Amitd
    Hi, I have a html page with a form. The form has Div which gets populated dynamically with Input elements like text box,radio,checkbox etc. Now I want to retrieve the values of these dynamically created elements in the Html page,so that i can submit it to a page. //HTML PAGE <script type="text/javascript"> $(function() { populateQuestions(); }); $("#submit_btn").click(function() { // validate and process form here //HOW TO ??retrieve values??? var optionSelected = $("input#OptionSelected_1").val();// doesn't work? // alert(optionSelected); postAnswer(qid,values);//submit values showNextQuestion() ;// populate Div Questions again new values }); </script> <form action="" name="frmQuestion"> <div id="Questions" style="color: #FF0000"> </div> //Question DIV generation script example radio buttons //questionText text of question //option for question questionOptions // **sample call** var question = createQuestionElement("1","MCQ", "WHAT IS ABCD??", "Opt1$Opt2$Opt3"); question.appendTo($('#Questions')); function createQuestionElement(id, type, questionText, questionOptions) { var questionDiv = $('<div>').attr('id', 'Question'); var divTitle = $('<div>').attr('id', 'Question Title').html(questionText); divTitle.appendTo(questionDiv); var divOptions = $('<div>').attr('id', 'Question Options'); createOptions(id, "radio", questionOptions, divOptions); divOptions.appendTo(questionDiv); return questionDiv; } function createOptions(id, type, options, div) { var optionArray = options.split("$"); // Loop over each value in the array. $.each( optionArray, function(intIndex, objValue) { if (intIndex == 0) { div.append($("<input type='" + type + "' name='OptionSelected_" + id + "' checked='checked' value='" + objValue + "'>")); } else { div.append($("<input type='" + type + "' name='OptionSelected_" + id + "' value='" + objValue + "'>")); } div.append(objValue); div.append("<br/>"); }

    Read the article

  • Complicated jQuery .hover Work

    - by Paul Herz
    The following code is giving me a lot of trouble. To note, .hover changes the background image. Firstly, how can I combine the two with .hover rather than a separate mouseenter and mouseleave? Second, How can I make it so that while the div is shifting upwards, the background image is simultaneously fading? $('div.designbox.orangehello').mouseenter(function() { $('div.designbox.orangehello').animate({ top: '-=10', }, 55, function() { $(this).addClass('hover'); }); }); $('div.designbox.orangehello').mouseleave(function() { $('div.designbox.orangehello').animate({ top: '+=10', }, 55, function() { $(this).removeClass('hover'); }); });

    Read the article

  • jquery stop image slider when accordian menu is closed

    - by Nik
    http://jsbin.com/emoba5/3/edit click here to view demo This accordion menu/image slider works well except - When the page loads and when all accordion menu items are closed I need it to show a single image on right. At the moment the page loads a blank picture area and when an accordion menu item is closed it just restarts that menu items picture slider. (So on page load and when all accordions are closed I need it default to an image on the right.) Some of the items only have 1 picture i.e. posture 3 you will notice when you click on it, it shows the image and then goes blank, can it just fade the image in and leave it there if there is only 1 image? Thanks to aSeptik for his help so far, feel free to make a revision of the posted code. Thanks guys Nik

    Read the article

  • jquery-ui from a bookmarklet

    - by Mala
    Hi I'm trying to create a bookmarklet which will use the jquery-ui - what steps must I take to do this? My bookmarklet loads a remote script and appends it to the page. This script includes jquery and jquery-ui, but getting the stylesheets and images is turning into a nightmare. Do I have to edit all the CSS to point images to their locations on the remote server? Effectively what I'm trying to do is have a bookmarklet which will pop up some information in a nice pretty draggable jquery-ui dialog. Is there an easier way? Thanks, Mala

    Read the article

  • jquery checkbox help

    - by sea_1987
    The Problem I am trying to run some ajax on one my pages for my website, basically I have three checkboxes all of which on pageload are unselected, when a checkbox is clicked I need to be able load in via ajax the relevant HTML. This system is currently a PHP script that depending on what the POST is set returns a different view, so I think all I need to is send the POST via AJAX, but I need to do everytime a new checkbox is checked. My HTML looks like this, div class="segment"> <div class="label"> <label>Choose region: </label> </div> <div class="column w190"> <div class="segment"> <div class="input"> <input type="checkbox" checked="checked" class="radio checked" value="Y" name="area[Nationwide]" id="inp_Nationwide"> </div> <div class="label "> <label for="inp_Nationwide">Nationwide</label> </div> <div class="s">&nbsp;</div> </div> </div> <div class="column w190"> <div class="segment"> <div class="input"> <input type="checkbox" checked="checked" class="radio checked" value="Y" name="area[Lancashire]" id="inp_Lancashire"> </div> <div class="label "> <label for="inp_Lancashire">Lancashire</label> </div> <div class="s">&nbsp;</div> </div> </div> <div class="column w190"> <div class="segment"> <div class="input"> <input type="checkbox" checked="checked" class="radio" value="Y" name="area[West_Yorkshire]" id="inp_West_Yorkshire"> </div> <div class="label "> <label for="inp_West_Yorkshire">West Yorkshire</label> </div> <div class="s">&nbsp;</div> </div> <div class="s">&nbsp;</div> </div> </div> My current attempt was to ascertain whether the input has been clicked so I have done this with my javascript, though this is probably wrong, $('input.radio').click(function(){ if($(this).hasClass('clicked')) { $(this).removeClass('clicked'); } else { $(this).addClass('clicked'); } });

    Read the article

  • problems with a jquery plugin

    - by CoffeeCode
    I'm using AJAX_POSTUP. When i make a request it sends a file to a bowser [offers to download] (the files content are params of the action methods). Does anyone know whats going on and how i can avoid this problem??? i'm not aware of other plugins such as AJAX_POSTUP

    Read the article

  • jQuery Validate: Checked *or* Filled?

    - by Mark
    required( dependency-expression ) They give an example of required: "#other:checked" but I want my field to be required if the #other field is either :checked or :filled (I don't know whether it will be a checkbox, radio button, or textbox beforehand). How would I do this?

    Read the article

  • Retrieving ids of chid divs using jquery?

    - by user187580
    Hello, Please have a look on the code below .. <div id="click_me">Save</div> <div id="blocks_sortable"> <div id="block_1"> <h2>Block 1</h2> <div class="items_sortable connectedSortable"> <div id="item_1"> <span>Item 1</span></div> <div id="item_2"> <span>Item 2</span></div> <div id="item_3"> <span>Item 3</span></div> </div> </div> <div id="block_2"> <h2>Block 2</h2> <div class="items_sortable connectedSortable"> <div id="item_4"> <span>Item 4</span></div> <div id="item_5"> <span>Item 5</span></div> <div id="item_6"> <span>Item 6</span></div> </div> </div> </div> <script> $("#click_me").click(function() { var result = $("#blocks_sortable > div"); for(var i=0; i<result.length; i++){ var str = ""; var str2 = ""; var block = result[i]; //div object //retrieve block id and create the string with id str += "block="+$(block).attr("id")+"&items="; //trying to select all the items of the current Block var result2 = $(block+" > div"); for(var j=0; j<result2.length; j++){ var item = result2[j]; str2 += $(item).attr("id")+","; } //end for items str = str+str2; // looking for a final string in the format of .. block=block_1&items=item_1,item_2,item_3 for loop 1 alert(str); } }); </script> It is not working. Is there any easier and working solution to get these ids. Please help. Thank you.

    Read the article

  • jQuery selector

    - by Anton
    I have few nested DIVs at page. I want to add event only for smalest DIV which size is more than 100x100 px. I am able to do it using conditions in code. Is it possible to do using selector? $('?????').click(function (e) { } If yes, please provide an example.

    Read the article

  • Isssue with ColorBox jQuery plugin

    - by RyanP13
    Hi, I am using this plugin for my new site: http://colorpowered.com/colorbox/ The page in concern has two hyper links which are of the same class: a.emailQuote These both should open the same colorbox window which is done by the following code: $("a.emailQuote").colorbox({ transistion:"fade", title:true, iframe:true, scrolling:false, close:"Close this window", innerWidth:478, innerHeight:507, initialWidth:478, initialHeight:507 }); however when the colorbox window opens it seems to register that there are two windows so displays the previous, next arrows and the text that says this is image one of two. I was wondering if there was a way to fix this without hiding these elements with CSS.

    Read the article

  • jQuery animation callback not working

    - by Tim
    Hey, if anyone could please help me then it would be much appreciated. Basically, I want to navigate to a new page once this animation has complete. Using the code below, the animation works fine but hen the navigation doesn't happen. Does anyone have any ideas or suggestions? Many thanks, Tim $("a").click(function(event){ event.preventDefault(); var driver = $(this).attr('href'); $(".content-center").animate({height: "0px"}, 500, function(){ navigate(driver); }); });

    Read the article

  • jquery to check if returned data object is empty

    - by user253530
    $("#post").live("click",function() { $("input:checkbox[name='bookmarkid']:checked").each(function() { $.post("php/socialbookmark-post.php", {bookmarkID: $(this).val()},function(data) { if(data != "") alert(data); }); }); }); the php file outputs some text only if something goes wrong. The checking that I do fails if the data is empty and displays an empty message. I need to fix this. Any ideas?

    Read the article

  • jquery live event gets executed twice

    - by victor_foster
    I am loading content into a page with ajax that will have live click events attached to them. It seems like the first time I load this content everything works as expected. If I load this again, the events fire twice (when put breakpoints in the code). What am I doing wrong? Is there a way I can clear the dom of these elements before they get loaded again?

    Read the article

  • problems with passing html to the server with jquery

    - by CoffeeCode
    i have an ajax call $.ajax({ url: '<%=Url.Action("SaveDetails","Survey") %>', dataType: 'JSON', cache: false, data: { Id: selectedRow.Id, Value: surveyValue, FileName: filename, FileGuid: fileguid }, success: function(data) { ... } }); where the surveyValue is a html string. this call doesn't work. but is i change the surveyValue to an ordinary text i works fine. how can i pass the html to the server?

    Read the article

  • Can jQuery add commas while user typing numbers?

    - by Matt
    How would I go about dynamically adding commas as a user is entering numbers? Is there a good number formatter that would help? I have to add these numbers later so I eventually have to remove the commas down the line. But the screen needs to show the commas for better readability.

    Read the article

  • JQuery animate div "like" a Zoom

    - by Russell Parrott
    I can never get these to work - sorry - but I I am trying to animate on a mouse over then "re-animate" on a mouse out. I can never get $('#xyz').hover(function(){'something',function(){'somethingelse'}); to work. Hope you guys can help. What I am trying to do is animate + and - 20px (top and left) on some absolutely positioned divs and then add 40px to the width height returning to the original position/width/height on mouse out. I haven't even got to the css widths/heights yet .... Here is my code (which is wrong - well it must be as it doesn't work :-) ) $('.box').hover(function(){ $(this).animate({'top':'-20','left':'-20'},function(){ $(this).animate({'top':'20','left':'20' }); }); Help really appreciated. Thanks in advance

    Read the article

< Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >