Search Results

Search found 17401 results on 697 pages for 'jquery selectors'.

Page 13/697 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Selector and Iterating Through a Table Within a Div

    - by GregH
    I have been working on this and cannot get this iterator to work. I have the following HTML and am trying to iterate through all rows (except the first row) and extract the values in cells (td) 2 and 3 : <div id="statsId"> <table width="220" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td width="65"/> <td width="90"/> <td width="65"/> </tr> <tr style="font-weight: bold;"> <td align="left">$1.00</td> <td> <a href="#">UserID1</a> </td> <td>Single</td> </tr> <tr> <td align="left">$6.99</td> <td> <a href="#">UserID2</a> </td> <td>Multiple</td> </tr> <tr>... .....(snip) I tried the following iterator to iterate through all except the first row of the table that is a child of "div#statsID" and get the values of the 2nd and 3rd cells (in the example, the first extracted cells would have values of "UserID1" and "Single"), but it doesn't work. $('div#statsId > table tr:not(:nth-child(1))').each(function(i, ele) { var secondCol = $('td:nth-child(2)', ele).innerHTML var thirdCol= $('td:nth-child(3)', ele).text() ..... }); Any suggestions on how to specify and iterate through the rows (except the first) of a table that is a child of a div would be appreciated.

    Read the article

  • Opening href in jQuery Dialog

    - by Phil
    Okay, so I've got the following code to create a dialog of a div within a page: $('#modal').dialog({ autoOpen: false, width: 600, height: 450, modal: true, resizable: false, draggable: false, title: 'Enter Data', close: function() { $("#modal .entry_date").datepicker('hide'); } }); $('.modal').click(function() { $('#modal').dialog('open'); }); All working fine. But what I want is to also be able to open a link in a dialog window, kinda like... <a href="/path/to/file.html" class="modal">Open Me!!</a> I've done this before by hardcoding the path: $('#modal').load('/path/to/file.html').dialog('open'); but we can't hardcode the path in the javascript (as there will be multiple coming from the database) and I'm struggling to understand how to get this to work. I'm also pretty sure that the answer is really obvious, and I'm merely setting myself up to be humbled by the clever folk here at StackOverflow, but I've scratched my head for long enough this afternoon, so my ego has been put away, and hopefully someone can point me in the right direction... Thanks Phil

    Read the article

  • jquery ui autocomplete problem

    - by Roger
    Hi, i've got a select box containing countries, and when one is selected, i want my autocomplete data for the city field to load via ajax. here's my code: // Sets up the autocompleter depending on the currently // selected country $(document).ready(function() { var cache = getCities(); $('#registration_city_id').autocomplete( { source: cache } ); cache = getCities(); // update the cache array when a different country is selected $("#registration_country_id").change(function() { cache = getCities(); }); }); /** * Gets the cities associated with the currently selected country */ function getCities() { var cityId = $("#registration_country_id :selected").attr('value'); return $.getJSON("/ajax/cities/" + cityId + ".html"); } This returns the following json: ["Aberdare","Aberdeen","Aberystwyth","Abingdon","Accrington","Airdrie","Aldershot","Alfreton","Alloa","Altrincham","Amersham","Andover","Antrim","Arbroath","Ardrossan","Arnold","Ashford","Ashington","Ashton-under-Lyne","Atherton","Aylesbury","Ayr",... ] But, it doesn't work. When i start typing in the city box, the style changes so the autocompleter is doing something, but it won't display this data. If i hard-code the above it works. Can anyone see what's wrong? Thanks

    Read the article

  • Is jquery datepicker easily capable of doing this?

    - by Fedor
    I basically have to clone the top area with arriving/departure: http://bit.ly/af1uAH The arrival and departure fields at the top have corresponding calendars. The last time I configured arrival and departure datepickers, they had a "Clear" button. Does anyone know if this changed between versions or is it still built-in? If anyone has examples of the top area ( excluding the bottom since that's extra work for me ) I would greatly appreciate it.

    Read the article

  • Loading JSON-encoded AJAX content into jQuery UI tabs

    - by pocketfullofcheese
    We want our of our AJAX calls in our web app to receive JSON-encoded content. In most places this is already done (e.g. in modals) and works fine. However, when using jQueryUI's tabs (http://jqueryui.com/demos/tabs/) and their ajax functionality, only plaintext HTML can be returned (i.e. from the URLs specified in the a tags below). How do I get the tab function to recognize that on each tab's click, it will be receiving JSON-encoded data from the specified URL, and to load in the .content index of that JSON? $(function() { $('div#myTabs').tabs(); }); <div id="mytabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all"> <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> <li class="ui-state-default ui-corner-top"><a href="/url/one">Tab one</a></li> <li class="ui-state-default ui-corner-top"><a href="/url/two">Tab two</a></li> </ul> </div>

    Read the article

  • jquery ui datepicker is huge

    - by iggnition
    Hi, im trying to add a datepicker to my symfony application and i got it working, but the size of the datepicker is about 3 times bigger than normal (on the demo page). I have not edited any CSS, i just used the default ui lightness theme no modifications. Does anybody have any idea why the size is blown up so big? CSS: http://paste2.org/p/835414 tough i doubt that will be very usefull.

    Read the article

  • jQuery tools modal overlay display problem in IE6-8

    - by Michael Stone
    I'm trying to enable the overlay to be modal. It works perfectly fine in FireFox, but the window object is behind the mask when it becomes modal. This prevents any interaction with it and the page is actually useless. I've tried debugging this for a while and can't figure it out. Here is a link to the example on their site: http://flowplayer.org/tools/demos/overlay/modal-dialog.html $.fn.cfwindow = function(btnEvent,modal,draggable){ //error checking if(btnEvent == ""){ alert('Error in window :\n Please provide an id that instantiates the window. '); } if(!modal && !draggable){ $('#'+btnEvent+'[rel]').overlay(); $('#content_overlay').css('cursor','default'); } if(!modal && draggable){ $('#'+btnEvent+'[rel]').overlay(); $('#content_overlay').css('cursor','move'); $('#custom').draggable(); } if(modal){ $('#'+btnEvent+'[rel]').overlay({ // some mask tweaks suitable for modal dialogs mask: { color: '#646464', loadSpeed: 200, opacity: 0.6 }, closeOnClick: false }); $('#content_overlay').css('cursor','default'); //$('#custom').addClass('modal'); } }; That's what I'm referencing when I call through: <script type="text/javascript"> $(document).ready(function(){ $(document).pngFix(); var modal = <cfoutput>#attributes.modal#; var drag = #attributes.draggable#; var btn = '#attributes.selector#'; var src = '#attributes.source#'; var wid = '#attributes.width#'; $('##custom').width(parseInt(wid)); $('div##load_content').load(src); $('##custom').cfwindow(btn,modal,drag,wid); }); </script> CSS for the modal: <style type="text/css"> .modal { display:none; text-align:left; background-color:#FFFFFF; -moz-border-radius:6px; -webkit-border-radius:6px; } </style> Exclude the and the additional pound signs, IE. "##". Screen shot of the problem: http://twitpic.com/1tak06 Note: IE6 and IE8 have the same problem. Any help would be appreciated.

    Read the article

  • JQuery Resize div

    - by msj121
    I want to add a div on a click and automatically start the resize mouse ui functionality with the mousedown. I can add the div easily, I have the resize functionality easy. But I can't figure out how to pass the mouse event and bind them so that the resize can start right away. Imagine a painting like program so the div can be added and drawn by dragging the mouse...? Thank you so much.

    Read the article

  • need explaination of jquery ajax.success paramters

    - by user1575229
    case 'ajax': busy = false; $.fancybox.showActivity(); selectedOpts.ajax.win = selectedOpts.ajax.success; ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, { url : href, data : selectedOpts.ajax.data || {}, error : function(XMLHttpRequest, textStatus, errorThrown) { if ( XMLHttpRequest.status > 0 ) { _error(); } }, success : function(data, textStatus, XMLHttpRequest) { var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader; if (o.status == 200) { if ( typeof selectedOpts.ajax.win == 'function' ) { ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest); if (ret === false) { loading.hide(); return; } else if (typeof ret == 'string' || typeof ret == 'object') { data = ret; } } tmp.html( data ); _process_inline(); } } })); break; Can anyone please explain what is going on in this code selectedOpts.ajax.win = selectedOpts.ajax.success; what is happening here?and what is the usefulness? ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest); what is happening here? what does the win() method call.

    Read the article

  • jquery function problem

    - by user295189
    I have this function function onclickRowRecord(recordID) { $.ajax({ type: "POST", url: '/file/to/post.to.php' , data: {recordID:recordID}, success: function(data) { //how to post this to function howToPost(recordID) the recordID } }); } function howToPost(recordID){ alert(recordID); } so how can I get the response from ajax success and post to the other function

    Read the article

  • jQuery UI resizable : auto height when using east handle alone

    - by z33m
    i have a jqueryui re-sizable div. I want only the width to be re-sizable and the height to remain auto, so that the div grows or shrinks with the content. If i set it to display only the east handle and use css height:auto, after resize the height also gets set even though only the width changed. I have to set the height to auto on resize event everytime like so: resize: function(event, ui) { $(this).css('height', 'auto'); } to prevent the height from being set. Is there a better way to prevent the height from getting set when only the east handle is used?

    Read the article

  • question about combining jquery tabs and a toggling horizontal slide panel

    - by Clay
    Hi, I'm attempting to combine a horizontally sliding panel and the ui tabs plugin. The idea is that you press a button, a panel slides open and inside is a series of tabs that expand content below. In terms of getting this to function in the most basic sense, so far so good: http://www.claylerner.com/bio_alt/ And my source looks like this: $(document).ready(function(){ $(".btn-slide").click(function(){ $("#panel").animate({width: 'toggle'}); }); }); $(function() { $("#tabs").tabs({ selected: -1 }); }); However, the problem I'm running into occurs when you have a tab exapnded and then you collapse the horizontal panel--as you can see the animation that hides the currently expanded tab looks pretty clunky. I get that this is happening because there's not a separate function hiding the expanded tab. So my question is, how can I make it so that when the button to collapse the panel (".btn-slide") is toggled it first hides any currently expanded tabs and then hides the open panel. Thanks so much!

    Read the article

  • Problems with Jquery Plugin: "ajax_postup"

    - 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

  • How to Create Div Toggle Effect using Jquery?

    - by ricky roy
    Hi, I want the following requirement. But there is slit change on it. http://acrisdesign.com/demo/toggle/ Plz consider the above link for bellow example. There are two toggle effect on Hover and Click.. My requirement when some on click on the top of the div. it will expand and there should be a closed button in the div some on mouse over to this image or click the div will closed. When some one mouse hover the link it will expand. First time click expand when mouse over the link collapse. there are three toggle links "click here" when some one click on the link it will create a space between each other but my requirement to it display top of the three link "click here". Plz if you have example then let me know.. Thanks & regards, Basat

    Read the article

  • Dynamic Jquery Accordion

    - by kwek-kwek
    How do I default an accordion to be closed on start-up. here is the sample view here Here is the code: <script> $(function() { $("#accordion").tabs("#accordion div.pane", {tabs: 'h3', effect: 'slide'}); }); </script> <script> // add new effect to the tabs $.tools.tabs.addEffect("slide", function(i, done) { // 1. upon hiding, the active pane has a ruby background color this.getPanes().slideUp("slow").css({backgroundColor: "#fff"}); // 2. after a pane is revealed, its background is set to its original color (transparent) this.getPanes().eq(i).slideDown("slow", function() { $(this).css({backgroundColor: 'transparent'}); // the supplied callback must be called after the effect has finished its job done.call(); }); }); </script>

    Read the article

  • jquery control execution of the callback functions

    - by user253530
    Function socialbookmarksTableData(data) is called by another function to generate the content of a table -- data is a JSON object. Inside the function i call 2 other functions that use getJSON and POST (with json as a return object) to get some data. The problem is: though the functions execute correctly i get undefined value for the 2 variables (bookmarkingSites, bookmarkCategories). Help with a solution please. function socialbookmarksGetBookmarkCategories(bookmarkID) { var toReturn = ''; $.post("php/socialbookmark-get-bookmark-categories.php",{ bookmarkID: bookmarkID },function(data){ $.each(data,function(i,categID){ toReturn += '<option value ="' + data[i].categID + '">' + data[i].categName + '</option>'; }) return toReturn; },"JSON"); } function socialbookmarksGetBookmarkSites() { var bookmarkingSites = ''; $.getJSON("php/socialbookmark-get-bookmarking-sites.php",function(bookmarks){ for(var i = 0; i < bookmarks.length; i++){ //alert( bookmarks[i].id); bookmarkingSites += '<option value = "' + bookmarks[i].id + '">' + bookmarks[i].title + '</option>'; } return bookmarkingSites; }); } function socialbookmarksTableData(data) { var toAppend = ''; var bookmarkingSites = socialbookmarksGetBookmarkSites(); $.each(data.results, function(i, id){ var bookmarkCategories = socialbookmarksGetBookmarkCategories(data.results[i].bookmarkID); //rest of the code is not important }); $("#searchTable tbody").append(toAppend); }

    Read the article

  • jQuery UI tabs link for _blank webpage

    - by Megawolt
    Hi fellas, In our format some pages must be in Tabs that's ok. But some of them must be open in a blank page... So How can i do that. I have try ; $('#tablar #tabs ul li a').filter(function() { return $(this).attr('rel') == 'ex'; }) .unbind() .click(function(e) { location.href = this.href; e.preventDefault(); }); But not working...

    Read the article

  • jQuery not replacing text in ReportViewer

    - by firedrawndagger
    I'm trying to replace text that I got back in the ReportViewer using jQuery. My div, wrapped in the table cell, display "empty" as text - which I plan on replacing with my own formatted text on the client side. I can use jQuery just fine to set a class on the div (which is inside a td element). Example: jQuery('div:contains("empty")').addClass('replacetext'); But for some reason I cannot do this: jQuery('div:contains("empty")').replaceWith('<div>Hello World</div>'); I tried this out on some other elements on the page and jQuery does work... but it seems like this issue is ReportViewer (I'm using 2008) specific.

    Read the article

  • JQUERY Effect highlight, control the Start & End colors

    - by nobosh
    I have the following: $(".notifycell_email_dailydigest").effect('highlight'); The element I want to highlight is over a gray background. Problem is the highlight goes from Yellow to white, and has this ugly slow pause at the end on the white which makes the animation look horrible. How can I modify the highlighy to start with the yellow but end on the gray so it matches the background? Thanks

    Read the article

  • background image for jquery ui dialog buttons

    - by mcgrailm
    is it possible to give a button a background image really i have an image that I want to use for a button and would be nice if they stayed in place like the default buttons. right now I just have them inside the dialog but the rest of the content is dynamic and I don't want them to disappear when the scroll bar appears

    Read the article

  • jQuery programmatically removing validation highlighting

    - by Sam Carleton
    The form has two check boxes (cbDeclined & cbIsOOfFac), two text fields and a drop down (txtHeight, txtWeight, ddlDevice). If either check box is checked, then the other controls are disabled and the rules for the other do no apply. Here are the current rules: $('form').validate({ highlight: function (element, errorClass) { $(element).addClass("invalidElem"); }, unhighlight: function (element, errorClass) { $(element).removeClass("invalidElem"); }, errorPlacement: function (error, element) { var parent = element.parent(); parent.append(error); }, errorElement: "div", errorClass: "errorMsg" }); function HeightWeightCtrlsEnabled() { return !cbDeclined.is(':checked') && !cbIsOOfFac.is(':checked'); } txtHeight.rules("add", { required: function (element) { return HeightWeightCtrlsEnabled(); }, maxlength: 3, min: 1, digits: true }); txtWeight.rules("add", { required: function (element) { return HeightWeightCtrlsEnabled(); }, maxlength: 4, min: 1, digits: true }); ddlDevice.rules("add", { required: function (element) { return HeightWeightCtrlsEnabled(); } }); function UpdateTextBoxes() { var disableCtrls = !HeightWeightCtrlsEnabled(); txtHeight.prop('disabled', disableCtrls); txtWeight.prop('disabled', disableCtrls); ddlDevice.prop('disabled', disableCtrls); if (disableCtrls) { txtHeight.val(''); txtWeight.val(''); ddlDevice.val(''); } } cbDeclined.click(function () { if (cbDeclined.is(':checked')) cbIsOOfFac.attr('checked', false); UpdateTextBoxes(); }); cbIsOOfFac.click(function () { if (cbIsOOfFac.is(':checked')) cbDeclined.attr('checked', false); UpdateTextBoxes(); }); The problem comes in when: The user enters something into txtWeight, clicks the submit to get both ddlDevice & txtHeight to highlight because they are required, then... The user clicks on either cbDeclined & cbIsOOfFac. The highlight is NOT going away. I am trying to figure out how to get the highlighting around the height and drop down to go away. I tried to create a fully working jsFiddler, but I cannot get anything to work, though everything looks correct. here is the link (I cannot post links, so I expanded it a bit) jsfiddle dot net/scarleton/9hDZQ/12/ If you remove the last /12/, you will see my first version that is a cut/paste from the real thing. Per a suggestion I tried adding $('form').valid(); a number of places. When I added it to the end of the UpdateTextBoxes() function, they started out highlighted, not what I want. When I added it after the click() event of either of the radio button, the text would go away, but the actual controls stayed highlighted. It looks like the function on the required property of the rule is not fully working, maybe. What is really interesting is this: When I enter a height, click , then weight and device are highlighted and have the error message under them. When I click on one of the radio buttons, the text goes away, but the highlight does not. But... The height is NOT highlighted, it stays normal.

    Read the article

  • jquery ui drag and drop showing feedback

    - by sea_1987
    Hi there, I have some drag and drop functionality on my website, I am wanting to hightlight the area that is droppable with a chage in border color when the draggable element is clicked/starting to be dragged. If the click/or drag stops I want the border of the droppable element to change back to its origianl state, I currently have this code, but it does not work very well. $(".drag_check").draggable({helper:"clone", opacity:"0.5"}); $(".drag_check").mousedown(function() { $('.searchPage').css("border", "solid 3px #00FF66").fadeIn(1000); }); $(".drag_check").mouseup(function(){ $('.searchPage').css("border", "solid 3px #E2E5F1").fadeIn(1000); }) $(".searchPage").droppable({ accept:".drag_check", hoverClass: "dropHover", drop: function(ev, ui) { var droppedItem = ui.draggable.children(); cv_file = ui.draggable.map(function() {//map the names and values of each of the selected checkboxes into array return ui.draggable.children().attr('name')+"="+ui.draggable.children().attr('value'); }).get(); var link = ui.draggable.children().attr('name').substr(ui.draggable.children().attr('name').indexOf("[")+1, ui.draggable.children().attr('name').lastIndexOf("]")-8) $.ajax({ type:"POST", url:"/search", data:ui.draggable.children().attr('name')+"="+ui.draggable.children().val()+"&save=Save CVs", success:function(){ window.alert(cv_file+"&save=Save CVs"); $('.shortList').append('<li><span class="inp_bg"><input type="checkbox" name="remove_cv'+link+'" value="Y" /></span><a href="/cv/'+link+'/">'+link+'</a></li>'); $('.searchPage').css("border", "solid 3px #E2E5F1").fadeIn(1000); }, error:function() { alert("Somthing has gone wrong"); } }); } });

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >