Jquery Javascript framework freezes in Firefox Ubuntu 8.04, don't know what to blame

I learned web applications in the old days before there were Javascript libraries and web application frameworks. When I find time (which might not happen), I wouldn't mind updating my experience with these more modern methods. However, if I did write a web page with one of these modern packages, I wouldn't want to slam together something that's too modern for many of the browsers of the user base. This brings me to some behavior that I have noticed on several web sites with relatively slick

How to find the Row in the html table using jquery

Iam adding a new row on click of a button and that row contains 3 textboxes and one select buutton .How do I make the textboxes and select box values to null of that newly added row . $('#table').find("sno_'+i'").val(''); Here "i " is dynamically generated row.But this is not working.

Detect end of horizontal scrolling div with jQuery

So, I've got some data tossed in a div. It's split up into chunks by date. It scrolls horizontally with the use of jQuery and the mousewheel plugin. I need to fire an event when the div has reached it's terminal point (farthest left, farthest right). I think that it is possible with the way it is currently implemented to calculate when you cannot scroll any further by detecting the data fetched in the mousewheel plugin. I just need a nudge in the right direction. Here's the code that does the h

Dynamically adding/removing rows in a table using jQuery/Javascript

I had gone through many solutions for the above problem but they are quite confusing as I 'cell left & cell right' didn't seem to be applicable in my case. Using clone method of jQuery is quite simpler, but there is also one problem. The problem is that when I clone the last row it will copy all data from above row. another problem attached to it is : ID. When cloning is done, same 'name' & 'ID' is copied which will create problem while posting data, so I need dynamics in this too. So I

Jquery .live. add/removeclass for login slidup/slidedown

Ok, so I have a Login form and I'm using Jquery to display it in a DIV that is using .slideUp() and .slideDown() to display it. Can anyone tell me why the form is doing a double-pump (slideup, slidedown, slideup) if you click the .account div to close it (trigger slideup)... ??? If I click outside the form and div it closes fine using this code ... $(".modal_div").live("blur", function(){ $(".account").removeClass('expand'); $(this).slideUp(); }); Here is the code I'm

Way to shorten jquerycode

I have several modal popup windows which all use the same settings. One of these requires the following code. var $modal = $('#modal') .attr('id', 'modal') .css({zIndex: 3000}); $('#modal-trigger').click(function(evt) { evt.preventDefault(), $('#modal').css("visibility","visible"); $(this).overlay({ effect: 'fade', glossy: true, opacity: 0.8, closeOnClick: true, onShow: function() { $('body').append($modal); }, onHide: function() { $modal.remove

How to set text to label with jQuery?

I want to set text to label with jQuery after clicking on button. I wrote code and it works, but after I set text in my label, label return his old state. Here is my code: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="DynamicWebApplication.WebForm2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="

For jQuery plugin why add object definition to $ instead of globaly?

I have been studying a jQuery plugin. The plugin extends $.fn as you would expect. However the plugin also defines an object for it's use. The object is defined like so.. $.MyObj = function() { } $.MyObj.prototype.foo = "green"; Why would you make the object definition a property of $ ? Why not just define the object globaly? MyObj = function() { } MyObj.prototype.foo = "green"; Are there any benefits to making the object definition a property of $ ?

Jquery JSONP / Export to Excel

We're using JSONP (cross-site request) request with JQuery to retrieve data from our server; everything is fine. But now we need to retrieve an Excel file; any idea / pointer on how to do that (we're using Firefox). Thx.

How can I extend jQueryUI datepicker to accept an additional argument?

I like that jQueryUI datepicker is customizable enough to allow for a button to trigger showing the datepicker, but, unfortunately, it doesn't allow you to customize your own markup. If I have markup like so: <span> <input type="text" class="datepicker" /> </span> <span> <button class="datepicker-trigger">Open</button> </span> In order to get it the datepicker to show when clicking the button, I'd have to implement the following code: $('.da

jQuery Validate: required field is empty but validating true

Here is what I am seeing in my web console: validationRules.rules.NameOnCard.required //true document.OForm.NameOnCard.value //"" $("#OForm").validate().element("#NameOnCard") //true The field is required, it is empty, and it is valid. What am I doing wrong? As a bit of background, I programmatically make payment info not required until the form shows a balance, then I make it required. If I remove that if/then code, it properly validates. But from what I can tell I am correctly telling va

Jquery Sliding 3 divs at a time in a horizontal slideshow

I am building a slideshow which shows 3 horizontal divs and 3 links at the bottom. The links need to slide 3 divs at a time and replace it with the next 3 divs (exactly 3 each click) here is what I built so far: http://tipoos.com/buzz I was wondering if I need to do it in a UL list or just using floating divs. finally decided to use divs. does anyone know how could I accomplish this? I would also like it to slide the 3 divs automatically every 5 seconds or so.. will appreciate any help Thank

Jquery slideup and down

I was wondering if there was a way to condense this code better so that I don't have to code every possible scenario. Any help is appreciated. $('select.contactselect').change(function(){ var selectVal = $(this).val(); if(selectVal == 'press'){ $('.support').slideUp('fast'); $('.general').slideUp('fast');  $('.press').delay(100).slideDown('fast', function() {      // Animation complete.  }); }else if (selectVal == 'general'){ $('.press').slideUp('fast'); $('.

equivalent ready functions in jQuery

Are these three equivalent? $(function(){ $("#a").html("i am a") }); (function($){ $("#b").html("i am b") })($); (function(){ $("#c").html("i am c") })(); The code is available here. Reference: jQuery document ready functions

Jquery library not working with sencha touch?

I am currently building an mobile application that is based on Sencha Touch 2. At the moment im just trying out some experiments to see what Sencha is capable too. And today I got stuck on a thing that really seems strange - I just wanted to try if I could use the jQuery library for my application and use it's additions. Strangest thing is I can't get any response from when I am making a jquery function. I've included the jquery library and my script in the index.html file in my sencha direct

Jquery if display = block do not enable function

I have a slide up function on click, but once it is displayed i don't want it to slide up again once the user clicks on the link a second time, but I can't seem to get it to work. According to answer iv'e read it was better to use .is hidden, but that doesn't seem to fix the problem. $(document).ready(function() { if ($('#aboutpage').is(":hidden")) { $('.about').click(function() { $(divPages).slideUp(1000); $('#aboutpage').slideDown(1000); }); }

Change images using Jquery (Circular motion)

Good day guys, I've a DOM like this <div class="Gallery"> <div class="GaleryLeftPanel"> <img id="img1" src="/Content/Public/images/1.png" style="z-index: 100" width="141" height="140" alt="image 1" /></div> <div class="GalleryMiddlePanel"> <img id="img2" src="/Content/Public/images/3.png" style="z-index: 99" width="715" height="497" alt="image 2" /></div> <div class="GaleryRi

Jquery Appended element does not move smoothly on mousemove?

I want to make a loading tip when you click on a button. Below is my attempt, this.mouse_loader_click = function(){ /* CONFIG */ xOffset = 10; yOffset = 20; $(".mouse-loader").click(function(e){ /* append the popup */ $(document.body).append("<p class='loading-tip'>Loading</p>"); $(".loading-tip") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("fas

Jquery Replacing multiple CSS files

So I want to replace 3 css files on a page, with the possibility of a 4th on certain pages... After reading around, I have this: $("link").each(function(index) { switch (index) { case 1: $this.attr("href","css1.css"); break; case 2: $this.attr("href","css2.css"); break; case 3: $this.attr("href","css3.css"); break; case 4: $this.attr("href","css4.css"); break; } }); Unfortunately, this doesn't work. I feel I am using "this" inc

Jquery plugin behave different on different instances

Im trying to write a simple autocomplete plugin for jquery (for learning purpose"). If u look at the DOM after the JS has run, there is to div after the input fields, but only the 2nd has the ul inside it. Why? it should be work identically on both input, shouldnt it? http://jsbin.com/avomez/1/edit and Here is my code: HTML <input class="city" type="text" /> <input class="city" type="text" /> JS $.fn.autocomplete = function(){ var self = $(this); var drpd = $('<di

evaluation tool with html and jquery

I'm making this evaluation tool that uses radio buttons to select the grade and show the total result, that is the sum of different factors using jquery. I can make the summary, but I dont know how to subtract the previous value selected when I change the grade. here is a jsfiddle that shows a simplified version of what I have.. current JQuery $('input[type=radio]').click(function(){ var x= parseInt($(this).val()); if ($('#weeh:not(:empty)').text()){ var y= parseInt($('#weeh'

Jquery Selecting first radio button to trigger change event

I have the following filter setup: <div class="element"> <input type="radio" name="group1" value="1"> <input type="radio" name="group1" value="2"> <input type="radio" name="group1" value="3"> </div> <div class="element"> <input type="radio" name="group2" value="1"> <input type="radio" name="group2" value="2"> <input type="radio" name="group2" value="3"> </div> And I'm using the following to select the first radio buttons automatical

Adding Hyperlink to text in JQuery

I am using innerText to add text to my object. Is there an easy way to add a hyperlink to the text? 'trend' also has a attribute called 'link'. this.node.innerText = trend.get('value');

Jquery Simple scroll to animation flicker

I am using a snippet of code that I found here: Simple jQuery scroll to anchor up or down the page...? I have it working fine but I get a quick flicker of the initial screen each time I click to scroll. I modified the script to work on a div instead of another anchor. Does anyone have any idea why this is happening? Thanks http://www.mniac.com/portfolio/

Jquery chrome and safari doesnt animate correctly?

Im using CSS3 to animate a :hover in my site - When I run it in Firefox, the navigation animation is perfect, the text slides in from left - However in Chrome and Safari, it seems, that it doesnt do the animation like in Firefox. In chrome it seems like to comes om from the bottom? You can see i live example here (It is the left navigation): http://www.wearewebstars.dk/frontend/Navigation/boerneunivers.html HTML for navigation is: <div class="left-navigation fixed"> &l

Jquery DataTables + input checkboxesdon't work

I have some checkboxes that work fine, but when I try to program their value in the following listener I can only check/uncheck the boxes via clicking on the table row, and not the checkbox: $('body').on('click', '#sourceTable tbody tr', function() { var r = dTable.fnGetData(this); var boxId = r[2].substr(r[2].indexOf("id")+4, 7); if (document.getElementById(boxId).checked){ //checked is true document.getElementById(boxId).checked=false; //uncheck the box } else{ document.getEleme

Jquery How do i create an overlay navigation menu?

I would like to create something similar to this http://www.domanistudios.com/mobile/ I'm pretty sure I need jquery but I havent been able to find a plugin that could do something similar to this. edit sorry: I meant the navigation menu. When you click on the menu

Jquery Switch classes without losing content

I have div#container, which contains two divs div.current-content and div.next-content. Both are filled with some content. How I can switch class between next and current content without losing data? This is my original reason, but with this I lost everything in current-content. changeContent = function (direction, toLoad) { if (direction == 'next') { container.append('<div class="next-content"></div>'); toScroll = -contentWidth; } else { container.

Jquery Umbraco 6.1.6 Ajax.BeginForm returns success but controller is never hits

Hello StackOverflowers I followed this tutorial: Ajax Umbraco MVC forms Guide My code works before the ajax implementation. After the small modifications, Ajax returns a success response but the controller breakpoint is never hits and so no email is ever sent I am on 6.1.6 but the code is the same. Any ideas? Here is my code: Controller: public class QuickContactController : SurfaceController { public ActionResult Index() { return PartialView("~/Views/Partials/mes-mini-co

Jquery check if various elements have class

I need to check that all elements have a certain class, if they all have the class then I need to perform something: I think the following just checks one element: <div class="game-area"> <div class="position1 block position"></div> <div class="position2 block position"></div> <div class="position3 block position"></div> <div class="position4 block position"></div> <div class="position5 block p

Jquery Not This

How do I hide all other items in a category that are not "this?" Basically am trying to do a simple sort. When you click on one category, show it and hide all the others. <nav> <a href="#">Student</a> <a href="parent" class="parentbtn">Parent</a> </nav> <div class="category student"> Student Form </div> <div class="category student"> Student Form </div> <div class="category student"> Student Form </div>

Jquery sticky sidebar switching from position

I am making a sticky sidebar that 'sticks' to the top of the page when the user scrolls past it. However, the sidebar does not work as it should, it keeps switching back and forth between static and fixed positioning as the user scrolls. $(document).scroll(function () { var docScroll = $(this).scrollTop(); var stickyListOffset = $(".sticky-list").offset().top; if(docScroll > stickyListOffset){ $(".sticky-list").css({ 'position' : 'fixed',

jQuery. Get text input field's value on button clicking event?

html: <div id="search"> <input id="term" type="text" value="enter your search" /> <button id="hit" type="button" name="">Search</button> </div> jQuery: $(document).ready(function() { var term = $('#term').val(); $('#hit').click(function() { alert(term); }); }); The problem is that , no matter what I type in the input field, then hit the button, it always alert the original input value which is "enter your search". How can I fix it?

Jquery summernote 0.7.3 enter causes a new paragraph

I'm using summernote 0.7.3 and habe the problem that it's adding a new paragraph instead of a linebreak. When I hit shift + enter it's adding the line break. I have found some plugins which aren't compatible to this version anymore. Is there a way to make hitting enter add a line break instead of a paragraph?

Jquery removing a kendoComboBox

I'm having a problem with a combobox that is created when a modal is opened, then if the user clicks out the modal and clicks it again, it creates another comboBox on top of the old one so it looks like this: In the documentation it talks of a destroy method, which is successfully running when I close the modal: $('#team1player_' + i).data('kendoComboBox').destroy(); $('#team1player_' + i).empty(); However it is still creating one on top of each other. What am I missing?

Jquery changing the functionality of the toggle button in mobile view

I am turning the PSD design to responsive template for online store. Here is link. I came across to the problem. There is a confuguration menu(config panel) on the left sife for choosing and filtering the desired good.When clicking on config panel toggle or on any items of config panel , config panel opens or closes. You can see the action visiting the link. But on mobile version, config panel is hiddedn by default. Only clicking the appropriate button reveals it. I embodied this by adding '.sho

used ajax call in jquery to get the values of check box but values are not passed into action result

For example, if the checkbox is checked, then I need to get that value and passed to controller $(document).ready(function () {$('input:submit').click(function () { var allVals = []; debugger; $('input[type="checkbox"]:checked').each(function () { allVals.push($(this).val()); }); $.ajax({ type: 'post', dataType: 'json', cache: false, url: '/Home/ApplyWithdraw', traditional: true, contentType: "application/json; charset

Jquery Colorbox popup on specific table column instead of row

I created Colorbox popup when a user click on anywhere in the table row by using below code. Now I want to open the popup only if someone click the 2nd column. $(".inline").colorbox({inline:true, width:"50%"}); <tr class="inline" href="#123"> <td>Name</td> <td>Address</td> </tr> <div style='display:none'> <div id='123' class="colorbox_content"> <p><strong>Title Here</strong></p> <p>D

Jquery Semantic-ui dropdown sizing

We are trying to passing bootstrap to semantic-ui. <select id="sayfaArama" class="ui search dropdown"> <option value="">Sayfalarda ara...</option> </select> https://i.stack.imgur.com/wXAVS.png I can't change the size of any input or dropdown neither with css nor constant sizing like tiny,medium or massive. I wan't to change the height of the dropdown. Can anybody help ?

Jquery Rails5: form remote - trigger submit

I have a form with remote option set. I need to trigger the submit programmatically. In Rails 4 I use $('form').trigger('submit.rails') and it works as expected. In Rails 5 (5.1.2 and 5.0.4) triggering that event causes a standard submit (formdata, not AJAX). For Rails staff 'submit.rails' is not part of Rails project, see here Any idea? UPDATE: Form code: <%= form_with(model: post, remote: true) do |form| %> <% if post.errors.any? %> <div id="error_explanation">

Converting Curl request to jQuery AJAX

I'm having trouble getting thing everything after -d except for the website. Curl command: curl -H “Authorization: Token #{auth_token}” -X GET -d ‘basket_id=#{basket_id}&price=#{price}&title=#{title}&merchant_url=#{merchant_url}&comment=#{comment}&product_url=#{product_url}&merchant_name=#{merchant_name}&color=#{color}&size=#{size}&product_image_url=#{product_image_url}’ http://localhost:3000/api/v1/baskets/add This is what I have so far: $.ajax({

Jquery Distributing bordered padded figures with flexbox so images are equal height

I'm using jquery to set the flex-grow value of a wrapper div to a figure's image's aspect ratio. This is based on a suggestion here. But when I add a border and padding to the figure, the images are no longer the same height. Is there a way to include the border and padding in this calculation to get all the images to be the same height? Or another way to get these figure images to have the same height? This becomes obvious if you comment out the border and padding from the figure css, then

How can I change class name in jquery

How can I change all class name a time in jquery. thanks for helpful. For Example: $('.myclass').removeClass("name-*"); $('.myclass').addClass("name-999"); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="myclass name-212"></div> <div class="myclass name-545"></div> <div class="myclass name-767"></div>

Jquery Download .net core generated pdf file with ajax

i am struggling with downloading generated pdf with .net core using ajax call. Basically i have a list of orders which user needs to select and then print pdf output. I can do it using button with action link, but i need to somehow pass in selected values (selected checkboxes), therefore i use ajax and pass in those values. So far i have this: html: <button id="btnPrintSelectedOrdersDeliveryLabels">Print labels</button> c#: return File(Convert.FromBase64String(deliveryAPIprintL

I can't setup jQuery on vscode

I am new to Stackoverflow, this is my very first question ever, I'm not sure how it all works yet, and I hope I will be able to explain my problem correctly. I was trying to use jQuery in vscode, so I installed Node.js, and then followed this tutorial on youtube; I typed npm install tsd -g, then npm install typings --global, and finally typings install dt~jquery --global in my terminal, as the guy in the tutorial said, and eventually the folder: "typings" appeared into project folder.

  1    2   3   4   5   6  ... 下一页 最后一页 共 1529 页