jquery-ui

How to validate content editable paragaraph

て烟熏妆下的殇ゞ 提交于 2020-01-25 06:49:12
问题 I'm using JQuery UI draggable option to drag and drop components to content editable paragraph.My code as follows, My code as follows: $(function() { function textWrapper(str, sp, btn) { if (sp == undefined) { sp = [0, 0]; } var txt = ""; if (btn) { txt = "<span class='w b'>" + str + "</span>"; } else { txt = "<span class='w'>" + str + "</span>"; } if (sp[0]) { txt = " " + txt; } if (sp[1]) { txt = txt + " "; } return txt; } function chunkWords(p) { var words = p.split(" "); words[0] =

jQuery slideToggle() applies display:block while sliding

我的未来我决定 提交于 2020-01-25 05:16:06
问题 I have a page that's like a discussion where you can make posts and reply to those posts. When there are more than 2 replies, I show the two most recent ones and hide the rest by default. There's a button that will let you expand/collapse the extra replies that uses jQuery's slideToggle function. It's operating on an unordered list of tables, where each table contains the comment along with the user's name and some other info. Here's the problem: While the tables are actually sliding up or

JTable : 'An error occured while communicating with the server ' while updating or deleting records

强颜欢笑 提交于 2020-01-24 23:32:08
问题 I am kind of stuck in this problem for hours until now. I am trying to update the record of a row of jTable by deleting or editing it, but every time I am facing the same error ( i.e An error occured during the communication with server ). I tried a lot to solve this but until now no succeed at all. I am successfully able to add record ( i.e an object of class 'Professor' ). But editing is not being performed and respective object's ( i.e Professor) controller's HTTPPost enabled method is not

On JQuery UI do one draggable connectToSortable multiple sortables

ε祈祈猫儿з 提交于 2020-01-24 21:51:27
问题 In JQuery UI, I have a draggable, It have an option connectToSortable as below: $("#social li").draggable({ connectToSortable: '#form_builder_sortable', helper:'clone', revert:true }); '#form_builder_sortable' is a sortable as below: $("#form_builder_sortable").sortable(); I want 1 draggable list connect to multiple sortable list, such as: $("#social li").draggable( { connectToSortable: '#form_builder_sortable, #form_builder_sortable_sample', helper:'clone', revert:true }); Have you got any

On JQuery UI do one draggable connectToSortable multiple sortables

三世轮回 提交于 2020-01-24 21:51:03
问题 In JQuery UI, I have a draggable, It have an option connectToSortable as below: $("#social li").draggable({ connectToSortable: '#form_builder_sortable', helper:'clone', revert:true }); '#form_builder_sortable' is a sortable as below: $("#form_builder_sortable").sortable(); I want 1 draggable list connect to multiple sortable list, such as: $("#social li").draggable( { connectToSortable: '#form_builder_sortable, #form_builder_sortable_sample', helper:'clone', revert:true }); Have you got any

How to perform the following ajax request on jQuery Accordion?

◇◆丶佛笑我妖孽 提交于 2020-01-24 20:10:09
问题 I've created a jQuery Accordion using Asp.Net MVC, and it's working fine. The accordion displays a list of employee names, and when I click on an item, it shows the details. I'd like to send an AJAX request to get the employee details when they click on an item, instead of loading all the employee details at once. Please look at my code below. Also, please tell me how to keep the first item in the accordion collapsed instead of showing the details, and is there any way to move the heading a

Can't set image to jsPlumb endpoint

被刻印的时光 ゝ 提交于 2020-01-24 19:53:28
问题 I'm using jsPlumb library in my project and I have a function that changes endpoint images if they are connected. I call it when the page loads and everything works fine, but when I call it on connection event, nothing happens. Here is my code: function changeEndpointImage(){ var elem = $('.tableBody'); //These are my connectable elements for(var i=0;i<elem.length;i++) { var eps=jsPlumb.getEndpoints($(elem[i])); //Getting endpoints for each of the connectable elements for(var j=0;j<eps.length

Jquery Impromptu Callback issue - $.prompt fails

孤街浪徒 提交于 2020-01-24 19:44:07
问题 I have an issue with jQuery Impromptu, specifically $.prompt with a callback function for an inline form. Now, the actual specific problem is the following. If the email_address field is blank when submitted I cannot get the $.prompt('Please supply an email address for the customer') to work, however if I change it to alert('Please supply an email address for the customer') it will work. I am guessing this is a scope issue as the other $.prompt calls work as expected which I assume are

JQuery UI set up my own tolerance

那年仲夏 提交于 2020-01-24 16:17:10
问题 I´m working on game for my little baby. I want to change default tolerance in droppable object. I know, that there are default values like touch, fit, intersect and pointer . But in my app it doesn't work correctly, because I want something between fit and intersect. When I use fit, it is too difficult to insert into correct position, and when I use intersect, it is too light. Here is my HTML source: <!DOCTYPE html> <html lang="sk"> <head> <title> Puzzle Slovakia </title> <script src="jquery

jquery autocomplete color change

北慕城南 提交于 2020-01-24 12:06:08
问题 I am using bootstrap for UI and jquery custome UI for autocomplete. When suggested items are listed, i would like to match bootstratp blue color instead of yellow. Where can I chnage the color and what is the correct hex ? Please see the attched image. Thanks! 回答1: .ui-state-hover { background: #428BCA!important; } Example: http://jsfiddle.net/trevordowdle/DLLVw/104/ 回答2: After a loot of tries, I found a working code for myself. After reading the entire jquery UI CSS file I found that #c77405