Search Results

Search found 26982 results on 1080 pages for 'jquery ui dialog'.

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

  • Jquery dialog box - doesn't fade out before closing

    - by Broken Link
    I have div(box) on my page and I'm using this script to display div as dialog box. Inside that div I have a hyper link, On click of the hyper link I want to fade out the dialog box and close.. The content of the dialog fades out, but the border of the dialog box remains same. If I add $("#box").dialog('close') to the click function after fadeto there is no effect.. it just closes the dialog box completely. Any help? using jquery-ui-1.7.2 <script type="text/javascript"> $(document).ready(function(){ $("a#later").click(function () { $("#box").fadeTo('slow', 0); }) }); $(function () { $("#box").dialog({ autoOpen: true, width: 500, modal: true, }); }); </script>

    Read the article

  • Jquery UI Dialog Empty On Auto-Open

    - by user1019588
    I am having a somewhat strange error with my jquery dialog. When I have it autoopen, the dialog box is completely empty. If I exit out of the dialog and then reopen (through the standard dialog open event) the content appears. The jquery setup: $("#content_locker").dialog({ autoOpen: true, modal: true, height: 600, width: 800 }); Here you can see the webpage that I am working on (it is a link-shortening service). The dialog div starts on line 148 of the source: <div id="content_locker" title="Exclusive Content"> You will see that the dialog is empty. If you exit out and click on the unlock button, the proper html is there. Any ideas?

    Read the article

  • Use JQuery UI Datepicker with Icons from Jquery UI Theme

    - by Craig McGuff
    I have a datepicker control setup using the JQuery UI, I am also using the JQuery UI themes which provide a bunch of default icons that I want to use. The DatePicker allows for specifying a specific image, i.e.: <script type="text/javascript"> $(document).ready(function() { $("#DateFrom").datepicker({ showOn: 'button', buttonImageOnly: true, buttonImage: 'images/ui-icon-calendar.png' }); }); </script> To display an icon from the icon set you use something like: <span class="ui-icon ui-icon-calendar"></span> Is there an easy to integrate the two or do I just need to hack out the styles/images manually?

    Read the article

  • jQuery scrollTop not working in chrome but working in Firefox

    - by Maju
    I have used a scrollTop function in jquery for navigating to top. But strangely 'The smooth animated scroll' stopped working in safari and chrome(scrolling without smooth animation) after I made some changes. But it is working smoothly in Firefox. What could be wrong? Here is the jquery function i used, jQuery $('a#gotop').click(function() { $("html").animate({ scrollTop: 0 }, "slow"); //alert('Animation complete.'); //return false; }); HTML <a id="gotop" href="#">Go Top </a> CSS #gotop { Cursor: pointer; position: relative; float:right; right:20px; /*top:0px;*/ }

    Read the article

  • Client-side templating frameworks to streamline using jQuery with REST/JSON

    - by Tauren
    I'm starting to migrate some html generation tasks from a server-side framework to the client. I'm using jQuery on the client. My goal is to get JSON data via a REST api and use this data to populate HTML into the page. Right now, when a user on my site clicks a link to My Projects, the server generates HTML like this: <dl> <dt>Clean Toilet</dt> <dd>Get off your butt and clean this filth!</dd> <dt>Clean Car</dt> <dd>I think there's something growing in there...</dd> <dt>Replace Puked on Baby Sheets</dt> </dl> I'm changing this so that clicking My Projects will now do a GET request that returns something like this: [ { "name":"Clean Car", "description":"I think there's something growing in there..." }, { "name":"Clean Toilets", "description":"Get off your butt and clean this filth!" }, { "name":"Replace Puked on Baby Sheets" } ] I can certainly write custom jQuery code to take that JSON and generate the HTML from it. This is not my question, and I don't need advice on how to do that. What I'd like to do is completely separate the presentation and layout from the logic (jquery code). I don't want to be creating DL, DT, and DD elements via jQuery code. I'd rather use some sort of HTML templates that I can fill the data in to. These templates could simply be HTML snippets that are hidden in the page that the application was loaded from. Or they could be dynamically loaded from the server (to support user specific layouts, i18n, etc.). They could be displayed a single time, as well as allow looping and repeating. Perhaps it should support sub-templates, if/then/else, and so forth. I have LOTS of lists and content on my site that are presented in many different ways. I'm looking to create a simple and consistent way to generate and display content without creating custom jQuery code for every different feature on my site. To me, this means I need to find or build a small framework on top of jQuery (probably as a plugin) that meets these requirements. The only sort of framework that I've found that is anything like this is jTemplates. I don't know how good it is, as I haven't used it yet. At first glance, I'm not thrilled by it's template syntax. Anyone know of other frameworks or plugins that I should look into? Any blog posts or other resources out there that discuss doing this sort of thing? I just want to make sure that I've surveyed everything out there before building it myself. Thanks!

    Read the article

  • How can I get jQuery validation plugin Ketchup to stop an Ajax form submission when validation fails?

    - by Marshall Sontag
    I'm using Ruby on Rails, Formtastic gem, jQuery and ketchup to validate my form. I'm submitting the form created by Formtastic inside a modal box using ajax: <% semantic_form_remote_for @contact_form, :url => '/request/contact' do |f| %> I have a validation plugin verifying the fields on the form: $(document).ready(function() { $("#new_contact_form").ketchup(); }); The problem is that semantic_form_remote_for generates an onSubmit ajax request that the jQuery validation plugins won't prevent, since it's not a normal form submission. One question on stackoverflow suggests using :condition on the remote form declaration to fire a javascript function, but I can't do that since I'm not using a function, but rather relying on a jQuery handler. I also tried putting ketchup within a submit event handler: $(document).ready(function() { $("#new_contact_form").submit(function() { $('#new_contact_form').ketchup(); }); }); No luck. Form still submits. I also tried using the beforeSend option of jQuery.ajax: $(document).ready(function() { jQuery.ajax( { beforeSend: function(){ $('#new_contact_form').ketchup(); } }); }); Validation fires off, but form is still submitted. I switched to jQuery Validation plugin just to see if it was due to some limitation in Ketchup. It turns out that Validation has a submitHandler option: $(document).ready(function() { $('#new_contact_form').validate({ submitHandler: function(form) { jQuery.ajax({ data:jQuery.param(jQuery('#new_contact_form').serializeArray()), dataType:'script', type:'post', url:'/request/contact' }); return false; } }); }); This works when I use a regular semantic_form_for instead of semantic_form_remote_for, but alas, I would rather use Ketchup. Is Ketchup just woefully lacking? Am I forced to use jQuery Validation?

    Read the article

  • How to display unique success messages on jquery form validation

    - by mastah
    Hi guys, hope you can help me on this one, I'm currently using this: jQuery plugin:validation (Homepage) I've been reading related questions here, but this one is the closest get. http://stackoverflow.com/questions/1863448/jquery-validation-on-success from the plugin's documentation http://docs.jquery.com/Plugins/Validation/validate#toption success String, Callback If specified, the error label is displayed to show a valid element. If a String is given, its added as a class to the label. If a Function is given, its called with the label (as a jQuery object) as its only argument. That can be used to add a text like "ok!". Currently I'm only object given to me is the label, and I can only add text to it. Now what I want is to have unique success message. For example: username field will have a success message: 'username okay!' email = 'email seems right' something along those lines, instead of displaying just one generic success message on all the fields. Thanks in advanced :)

    Read the article

  • Jquery UI Autocomplete widget conflict qith jqeury.menu widget - how can I solve it?

    - by JK
    My app already has a completed menu using jquery.menu.js found at http://wiki.jqueryui.com/Menu. I'm now also trying to add the jquery autocomplete widget from jquery ui 1.8.1 - but both of these have a .menu() function that conflicts with each other. If I put jquery-ui-1.8.1.custom.js first in the head, then autocomplete works but the menu does not. If I put jquery-menu.js first in the head, then the menu works but autocomplete doesnt. Is there a way to solve this without editing either plugin? (If I edit, I will probably lose those changes the next time either plugin is upgraded)

    Read the article

  • jQuery UI Rang Slider show divs based on selected range

    - by andi_sf
    I have set up a range slider that should show/hide divs based on their range values - meaning if the range of the one specifies in the div falls into the selected range in the slider it should show - the others hide. Somehow it does not work correctly - if anybody could help that would be greatly appreciated. My code so far: $("#slider").slider({ range: true, min: 150, max: 280, step: 5, values: [150, 280], slide: function(event, ui) { $("#amount").val('Min. Value' + ui.values[0] + ' - Max. Value' + ui.values[1]); }, change: function(event, ui) { $('#col-2 div').each(function(){ var valueS = parseInt($(this).attr("class")); var valueX = parseInt($(this).attr("title")); if (valueS < ui.values[0] && valueX <= ui.values[1] || valueS ui.values[0] && valueX = ui.values[1] ) { $(this).stop().animate({opacity: 0.25}, 500) } else { $(this).stop().animate({opacity: 1.0}, 500) $("#amount").val('Min. Value' + ui.values[0] + ' - Max. Value' + ui.values[1]); } }); } }); $("#amount").val('Min. Value' + $("#slider").slider("values", 0) + ' - Max. Value' + $("#slider").slider("values", 1)); }); I have also posted a sample at: http://www.webdesigneroakland.com/slider/444range_slider.html

    Read the article

  • clicking anchor element within jquery tab loads new page *outside* tab

    - by tabs_newbie
    Hello, I would like to be able to click on an achor element from a page inside a jQuery tab and have that new page load directly inside the original tab. I used sample code from the jQuery tutorial page but to no avail! When I click on the anchor tag, I get redirected to www.google.com but lose my tabs. Does anyone know what I'm doing wrong? would really appreciate it. Thanks! $(document).ready(function(){ $("#tabs").tabs(); }); $('#tabs').tabs({ load: function(e, ui) { $('a', ui.panel).click(function() { $(ui.panel).load(this.href); return false; }); } });

    Read the article

  • jQuery show submit button on input field click

    - by Pjack
    Hi, I'm trying to have a comment input field that will show the submit button on a dynamically created form when you click on the input field. Similar to how facebook comments work. When you click on the input field the submit button appears and when you click off it disappears. All the comment input id's are comment_1 etc and the submit button id's are submit_1 etc. I've tried this, jQuery("#[id^='comment_']").live('click',function(event){ if(jQuery("#[id^='comment_']").val() == ""){ jQuery("#[id^='submit_']").hide(); } else { jQuery("#[id^='submit_']").show(); } }); And that won't work for some reason. Any suggestion or how it can be accomplished would be great.

    Read the article

  • jquery buttons icons for dialog

    - by khinester
    I have this code: $(function() { var mainButtons = [ {text: "Invite" , 'class': 'invite-button' , click: function() { // get list of members alert('Invite was clicked...'); } } // end Invite button , {text: "Options" , 'class': 'options-button' , click: function() { alert('Options...'); } } // end Options button ] // end mainButtons , commentButtons = [ {text: "Clear" , 'class': 'clear-button' , click: function() { $('#comment').val('').focus().select(); } } // end Clear button , {text: "Post comment" , 'class': 'post-comment-button' , click: function() { alert('send comment...'); } } // end Post comment ] // end commentButtons $( "#form" ).dialog({ autoOpen: false , height: 465 , width: 700 , modal: true , position: ['center', 35] , buttons: mainButtons }); $( "#user-form" ) .button() .click(function() { $(this).effect("transfer",{ to: $("#form") }, 1500); $( "#form" ).dialog( "open" ); $( ".invite-button" ).button({ icons: {primary:'ui-icon-person',secondary:'ui-icon-triangle-1-s'} }); $( ".options-button" ).button({ icons: {primary:'ui-icon-gear'} }); }); // Add comment... $("#comment, .comment").click(function(){ $('#comment').focus().select(); $("#form").dialog({buttons: commentButtons}); $( ".post-comment-button" ).button({ icons: {primary:'ui-icon-comment'} }); $( ".clear-button" ).button({ icons: {primary:'ui-icon-refresh'} }); }); //Add comment // Bind back the Invite, Options buttons $(".files, .email, .event, .map").click(function(){ $("#form").dialog({buttons: mainButtons}); $( ".invite-button" ).button({ icons: {primary:'ui-icon-person',secondary:'ui-icon-triangle-1-s'} }); $( ".options-button" ).button({ icons: {primary:'ui-icon-gear'} }); }); // Tabs $( "#tabs" ).tabs(); $( ".tabs-bottom .ui-tabs-nav, .ui-tabs-nav > *" ) .removeClass( "ui-widget-header" ) .addClass( "ui-corner-bottom" ); }); ? What is the right way to add the button icons? As in my code I had to add it two times, once: $( "#user-form" ) .button() .click(function() { $(this).effect("transfer",{ to: $("#form") }, 1500); $( "#form" ).dialog( "open" ); ... and $(".files, .email, .event, .map").click(function(){ ... Could this code be improved further? I don't seem to be able to get the "transfer" effect to work correctly in a modal. I added: , close: function() { $(this).effect("transfer",{ to: $("#user-form") }, 1500); } to the $( "#form" ).dialog({ How would you go about in getting the "transfer" to work nicely when you open and close the dialog box?

    Read the article

  • jQuery Dialog theme not being applied

    - by Tim
    I'm using jquery-1.4.2.min.js and jquery-ui-1.8.1.custom.min.js. According to Firebug, both minimized scripts have been loaded. They both appear in the dropdown list on Firebug's Scripts tab. The dialog is launching, but there's no background and so the text below it shows through, and there's no "window" stuff at all, no titlebar, no X button. Just the floating/draggable text with a -close- link at the top left corner. I was under the impression from reading these pages http://jqueryui.com/demos/dialog/ http://jqueryui.com/themeroller/ that the UI theme-driven appearance would be automatically applied to the dialog when it was invoked using this barebones call: $('#dialog').dialog() I would be grateful for suggestions on how to troubleshoot this. Thanks

    Read the article

  • jQuery UI Dialog pass on variables

    - by Dante
    Hi, I'm creating a Web interface for a table in Mysql and want to use jQuery dialog for input and edit. I have the following code to start from: $("#content_new").dialog({ autoOpen: false, height: 350, width: 300, modal: true, buttons: { 'Create an account': function() { alert('add this product'); }, Cancel: function() { $(this).dialog('close'); $.validationEngine.closePrompt(".formError",true); } }, closeText: "Sluiten", title: "Voeg een nieuw product toe", open: function(ev, ui) { /* get the id and fill in the boxes */ }, close: function(ev, ui) { $.validationEngine.closePrompt(".formError",true); } }); $("#newproduct").click(function(){ $("#content_new").dialog('open'); }); $(".editproduct").click(function(){ var test = this.id; alert("id = " + test); }); So when a link with the class 'editproduct' is clicked it gets the id from that product and I want it to get to the open function of my dialog. Am I on the right track and can someone help me getting that variable there. Thanks in advance.

    Read the article

  • jQuery .ajax success function not rendering html with jQuery UI elements.

    - by tylerpenney
    How do I have the html loaded into my div from the .ajax render with jquery? the success function loads the HTML, but those elements do not show up as jQuery UI elements, just the static HTML types. Any pointers? $(function() { $('input[type=image]').click(function(){ $.ajax({ url: '_includes/callinfo.php', data: 'id=' + $(this).attr('value'), dataType: "html", success: function(html){ $('#callwindow').html(html); } }); }); });

    Read the article

  • jquery: How to completely remove a dialog on close

    - by Svish
    When an ajax operation fails, I create a new div with the errors and then show it as a dialog. When the dialog is closed I would like to completely destroy and remove the div again. How can I do this? My code looks something like this at the moment: $('<div>We failed</div>') .dialog( { title: 'Error', close: function(event, ui) { $(this).destroy().remove(); } }); When I run this the dialog box shows up correctly, but when I close it the dialog is still visible in the html (using FireBug). What am I missing here? Something I have forgotten? Update: Just noticed my code gives me an error in the firebug console. $(this).destroy is not a function Anyone able to help me out? Update: If I do just $(this).remove() instead, the item is removed from the html. But is it completely removed from the DOM? Or do I somehow need to call that destroy function first as well?

    Read the article

  • Global jQuery dialog variable not working properly

    - by Ben Dauphinee
    When I call the function, the dialog does work. If I move the dialog construction into the showtimes_list function, everything works fine. I thought that variables declared outside a function were global in context? var dialog_list = $("<div></div>").dialog({ autoOpen: false, modal: true, height: 300, width: 720, }); function showtimes_list(sid){ dialog_list.html(""); $.get("ajax_showtimes.php?sid="+sid, function(data){ dialog_list.html(data); } ); dialog_list.dialog("open"); }

    Read the article

  • Why unchecked jQuery UI radio button's label appears "checked" after refresh in FF and IE?

    - by Daj pan spokój
    I've got 2 radio buttons with labels: button A is checked by default in HTML (checked="checked"). They're then processed with jQuery UI Radio Button. When I check button B and refresh the page, B's label is displayed as checked (it has CSS ui-state-active class). And A's label is displayed as unchecked, even though it's A button that is actually checked. It happens in Firefox (3) and IE (8). In Chrome (5) it works fine - after refresh A's label is displayed as checked. <input class="ui-helper-hidden-accessible" id="show-all-hotels" name="radio" CHECKED="CHECKED" type="radio"> <label aria-disabled="false" role="button" class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-left" aria-pressed="false" for="show-all-hotels"> <span class="ui-button-text">All tours</span> </label> <input class="ui-helper-hidden-accessible" id="show-availability" name="radio" type="radio"> <label aria-disabled="false" role="button" aria-pressed="true" class="UI-STATE-ACTIVE ui-button ui-widget ui-state-default ui-button-text-only ui-corner-right" for="show-availability"> <span class="ui-button-text">Only available at</span> </label> Do You know why is it happening and how to make checked button label appear as checked in all browsers?

    Read the article

  • Jquery hide is not working in my Dialog box close span

    - by kumar
    $('.ui-dialog-titlebar-close ui-corner-all').hide(); this is the hide for my Jquery dialog close 'X' span.. this is not working in my case. I am trying to hide that Close becuase its not showing me in my dialog when I resize my dialog then its showing me.. some reason my CSS not showing me that Close button correctly on my POPUP. Can any body help me out. here is my code and CSS. $("#window").dialog({ resizable: true, height: 180, title: titles, width: 500, modal: true, open: function () { $('.ui-widget-overlay').show(); $('.ui-dialog-titlebar-close ui-corner-all').hide(); }, buttons: { "OK": function () { $(this).dialog("close"); if (redirectURL) { window.location = redirectURL; } } } }); here is my CSS. <style> .ui-widget-overlay { background: black; opacity: 0.5; filter: alpha(opacity = 50); position: absolute; top: 0; left: 10; } </style> Can any body tell me how to show My Close 'X' correctly on my dialog or I need to hide that Close 'X' thanks

    Read the article

  • jQueryUI dialog width

    - by user35295
    Fiddle Full Screen Example I use jQuery dialog to open tables. Some of them have a large amount of text and they tend to be too long and go way off the screen. How can I make the dialog wider if the table is too long like the first one in the fiddle? I've tried width:'auto' but it seems to just occupy the entire screen. HTML: <button class='label'>Click</button><div class='dialog'><p><table>.....</table></div> <button class='label'>Click</button><div class='dialog'><p><table>.....</table></div> Javascript: $(document).ready(function(){ $('.label').each(function() { var dialogopen = $(this).next(".dialog"); dialogopen.dialog({width:'auto',autoOpen: false,modal: true, open: function(){ jQuery('.ui-widget-overlay').bind('click',function(){ dialogopen.dialog('close'); }) } }); $(this).click(function(){ dialogopen.dialog('open'); return false; } ); }); });

    Read the article

  • Problem inserting JavaScript into a CKEditor Instance running inside a jQuery-UI Dialog Box

    - by PlasmaFlux
    Hello Overflowers! Here's what's going on: I'm building an app (using PHP, jQuery, etc), part of which lets users edit various bits of a web page (Header, Footer, Main Content, Sidebar) using CKEditor. It's set up so that each editable bit has an "Edit Content" button in the upper right that, on click, launches an instance of CKEditor inside a jQuery-UI Dialog box. After the user is done editing, they can click an 'Update Changes' button that passes the edited content back off to the main page and closes the Dialog/CKeditor. It's all working magnificently, save for one thing. If someone inserts any JavaScript code, wrapped in 'script' tags, using either the Insert HTML Plugin for CKEditor or by going to 'Source' in CKEditor and placing the code in the source, everything seems okay until they click the 'Update Changes' button. The JavaScript appears to be inserting properly, but when 'Update Changes' is clicked, instead of the Dialog closing and passing the script back into the div where it belongs, what I get instead is an all-white screen with just the output of the JavaScript. For example, a simple 'Hello World' script results in a white screen with the string 'Hello World' in the upper left corner; for more intricate scripts, like an API call to, say Aweber, that generates a newsletter signup form, I get an all-white screen with the resulting form from the Aweber API call perfectly rendered in the middle of the screen. One of the most confusing parts is that, on these pages, if I click 'View Source', I get absolutely nothing. Blank emptiness. Here's all my code that handles the launching of the CKEditor instance inside the jQuery-UI Dialog, and the passing of the edited data back into its associated div on click of the 'Update Changes' button: $(function() { $('.foobar_edit_button') .button() .click(function() { var beingEdited = $(this).nextAll('.foobar_editable').attr('id'); var content = $(this).nextAll('.foobar_editable').html(); $('#foobar_editor').html(content); $('#foobar_editor').dialog( { open:function() { $(this).ckeditor(function() { CKFinder.SetupCKEditor( this, '<?php echo '/foobar/lib/editor/ckfinder/'; ?>' ); }); }, close:function() { $(this).ckeditorGet().destroy(); }, autoOpen: false, width: 840, modal: true, buttons: { 'Update Changes': function() { // TODO: submit changes to server via ajax once its completed: for ( instance in CKEDITOR.instances ) CKEDITOR.instances[instance].updateElement(); var edited_content = $('#foobar_editor').html(); $('#' + beingEdited).html(edited_content); $(this).dialog('close'); } } }); $('#foobar_editor').dialog('open'); }); }); I'm all sorts of confused. If anyone can point me in the right direction, it will be greatly appreciated. Thanks!

    Read the article

  • Jquery Template textbox not showing datepicker

    - by pirzada
    I am using Datepicker on one of the the textbox in Jquery template but its not popping up. Outside of the template working fine. Below is what I want to do. jQuery().ready(function () { //$("#HireDate").datepicker(); $("#HireDate").datepicker({dateFormat:'dd-mm-yy', showAnim:'fadeIn'}) }); <script id="UserDetailTemplate" type="text/x-jquery-tmpl"> <table style="width:100%;"> <tbody> <tr> <td style="width:25%;font-weight:bold;">HireDate:</td> <td><input type="text" id="HireDate" value="${ HireDate }" /></td> </tr> </table> </td> </tr> </tbody> </table> </script>

    Read the article

  • Combining the jquery Calendar picker with the jquery validation and getting them to play nice?

    - by MBonig
    I'm just starting to get into jquery/javascript programming so this may be a beginner question but I sure can't seem to find anything about it. I have a text field on a form. I've used the JQuery UI Calendar picker to make data entry better. I've also added jquery validation to ensure that if the user enters the date by hand that it's still valid. Here is the html: <input class="datepicker" id="Log_ServiceStartTime_date" name="Log_ServiceStartTime_date" type="text" value="3/16/2010"></input> and javascript: $('form').validate(); $('#Log_ServiceStartTime_date').rules('add','required'); $('#Log_ServiceStartTime_date').rules('add','date'); the problem I'm having is this: If a user puts in a bad date, or no date at all, the validation correctly kicks in and the error description displays. However, if the user clicks on the textbox to bring up the calendar picker and selects a date, the date fills into the field but the validation does not go away. If the user clicks into the textbox and then back out, the validation correctly goes away. How can I get the calendar picker to kick off the validation routine once a date is selected? thanks

    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

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