jQuery: a question on events
How can I do with jQuery so that a mousemove event is active only if the left mouse button is being kept pressed, and as soon as the button gets released the mousemove event stops? ...
How can I do with jQuery so that a mousemove event is active only if the left mouse button is being kept pressed, and as soon as the button gets released the mousemove event stops? ...
I'm trying to write a somewhat generic method for retrieving data either from the browser cache if it's available, or a JSON request if it's not. Right now, all I want to do is be able to give my data.get method an id, and return the correct results. This works perfectly fine - console logs the new object being retrieved via JSON the fir...
I have some items populated in the listbox from the database in my asp.net mvc(C#) application. I need to give an option to move up/move down the items in the listbox and store it back to the database with the updated order. I like to use jquery to move up / move down the items in the listbox. Whats the best way/soultion to do it? Or i...
I am having trouble using JQuery to work with multiple radio button groups. The JQuery code, for some reason, cannot tell the difference between the two groups of radio buttons and cannot tell which group of radio button I clicked on. Here is the HTML code: <!-- Radio button group 1 --> <input type="radio" name="group_1" value="full_d...
How to style from elements unobtrusively in all browsers including IE6 ...
hello, I'm new to programming jquery, I'm trying to make a table from a query in an Oracle database. The code to create the table is something like this: <form method="get" name="SC" > <table id="tabla1" width="1129" height="32" id="tabla" border="3" align="center" bordercolor="#FFFFFF"> <thead> <tr> <th width="77" height="22" ...
How could I know with help of jQuery as to which edge (ie. border) of the div box mouse cursor is on? ...
Hi All, I have a table, now on load i am hiding few last rows.Now on click of a span it will expand (last few rows)and collapse.I am using Slidetoggle(), and its working fine in IE, but the problem is its breaking in FF, first few rows are breaking in FF.how to fix this?any suggestion? EDIT: $("tr").slice(index).slideToggle('slow')//thi...
i have a list with ul and li as: <ul id="list1"> <li id="item-1">List Item 1</li> <li id="item-2">List Item 2</li> <li id="item-3">List Item 3</li> <li id="item-4">List Item 4</li> <li id="item-5">List Item 5</li> <li id="item-6">List Item 6</li></ul> I need to get all the ids of the li inside ul as comma separated string using ...
Hello, I'm developing a website for a client using ASP.NET MVC 1.0. There is a "profile's page" with many links releated to the profile. For example, "request contact", "see our diretions", "add as your friend", etc. I would like to use one of the many jquery modal scripts to show this links, without load them as a normal page/link, b...
I'm using jQuery in our Java project and 3 AJAX requests to refresh 3 columns. The problem is if you click something before the response received that sometimes one of the JSPs meant to return response in a particular DIV, overwrites the entire page and has beeing returned as a new page. I use AJAX Queue plugin which should cancel the re...
Hello all, I want to write the following JS code but I am not sure if it will work - its going to be a lot more complicated than the below and I was hoping to get advice from others before I waste a lot of time. function ajax_request(array_element){ $.get("process_txt.php", { path: full_path }, function (data){ })...
How to make Accessible popup using jquery with custom size and poition in perfect center on screen on any resolution? if JavaScript would be disabled then link should be open like normal link in new window/tab. I need unobtrusive method to add class to link also in script not in xhtml. ...
Hi, I'm doing an animate with JQuery UI. I've go an icon which I want to stick out over the edge of the div, so I'm using negative margins. The animation resizes the div and changes the background color. However, when I animate the div the areas of the image outside the div (in the neg margins) disapear for the duration of the animat...
I want to find out if DOM element a contains DOM element b (that is, if a is an ancestor of b in the DOM tree). Thus, something like: $(b).closest(a); but where 'a' is a DOM node here, not a selector. Can jQuery help with that? All the useful functions I can find take selector strings rather than elements, which doesn't really help...
I write a form with jquery ajax form in asp.net (c#) .When I submitting a form with ajax submit ,the master page and form show again.I want to move master page.How do I solve this? ...
Hello all, I make 7 get requests at the same time to one PHP script - two of the requests are successful and the other requests I get an output of Max Execution of 60 seconds exceeded! The thing is I have put this at the top of my script: set_time_limit(300000); I have also set this in my PHP.ini file and have restarted apache sever...
Hi all, In a jquery code, I am dynamically showing and hiding some content. if (this.hide()) { this.show(); } else { alert("Hello"); this.hide(); } But else part is never getting executed.why? ...
I'm doing a very basic image load function in Jquery, this is the code I have: $(document).ready(function(){ var img = new Image(); // $(img).load(function () { alert('loaded'); }).error(function () { alert('error'); }).attr('src', 'images/loader.gif'); }); In firefox it works fine b...
Working on a request to add a pretty tooltip to a page (using jQuery tooltip plugin, as recommended by others on my team). Pretty tooltip is working fine, but two of the existing specs now fail, an example below: describe 'with a discussion post containing html' do before(:each) do @post.update_attributes(:body => "some <strong>...