simple problem
This code works $("#aaa").click(function(){ $.post("insert.html",function(data,status){ document.getelementbyid('mas').innerHTML = data; }); }); This code does not work $("#aaa").click(function(){ $.post("insert.html",function(data,status){ $("#mas").innerHTML = data; }); }); The only difference is that i have changed document.getelementbyid to $("#mas") which i thought was the correct jquery equivalent. i expect that this is some tiny syntax error so what is the problem
How to change or replace array of array in jquery?
My array is like this : var arr = new Array(); arr.push([1,1]); // index 0 arr.push([1,2]); // index 1 arr.push([1,3]); // index 2 change value 3 to 5 arr.push([1,4]); // index 3 Can splice() method be used for doing this?
Switch from grid view to list (and back) with a fade effect
I have a category page that can be viewed in grid or a list. I want to add a fade affect when I switch between the views. How can I do that? Here is my js: $("a.grid_view").click(function () { $(".category_div").addClass("box_view"); $(this).addClass("active"); $("a.list_view").removeClass("active"); }); $("a.list_view").click(function () { $(".category_div").removeClass("grid_view"); $(this).addClass("active"); $("a.box_view").removeClass("active");
How to remove array element?
My arry is : var arr = new Array(); arr.push([1,2]); arr.push([2,2]); arr.push([3,3]); I want to remove no 2 element so i tried following methods arr.remove([2,2]); // not working i tried to get index of element but that also did not work arr.indexOf([2,2]);
FlexSlider / need some fix
Today a try add some extra animation into flexslider...that's everything is great the script work but need tune up for better working... So I want to explain this - 1 The slider now used only for words animation - 2 I want use animation like Animate from left step2 animate from bottom step3 animate from top - The problem what i found is when define the animation "Fade" or "Slide" The first step animate with all effect but the next step olny slide or fade... - I think is not hard
Changing type of input is now okay ?
Hello, I was doing some research on changing the type of an <input /> using jQuery and I found multiple answers saying that jQuery forbids this as it doesn't work in IE. However, I tried it and it is working. Meaning, it doesn't throw an error and prevent me from doing it like my research said it would. Is this allowed in jQuery now? Is it supported in IE now by 1.9 ?
toggle() behavior
Hello, I wonder if there is a way to modify the toggle() behavior. Currently I use a link to show/hide a vertical menu: $ ( '#link' ) . click ( function ( ) { $ ( '#mydiv' ) . toggle ( ) ; } ) ; It works but the effect is something odd, It looks like a fade plus a horizontal scroll which doesn't fits with my vertical menu. I would like to make it scroll from the top to the bottom. Is it possible? Thanks in advance.
Implementation of the TouchSwipe-Jquery-Plugin
Hi, I'd like to use the TouchSwipe-Jquery-Plugin (https://github.com/mattbryson/TouchSwipe-Jquery-Plugin) to insert a value into an input field from a tablet. The value must be between 0 and 12. I'd like that if I swipe right, every 50px of swiping, the value add +1, until the maximum value (12). If I swipe left, every 50px of swiping, the value subtracts -1, etc... The second implementation that I'd like to insert is a clickable button that add +1 to the value. Can you help me to write this script
Jquery conflict, one script won't work with another
I have jquery script for menu (lava lamp http://www.htmldrive.net/items/show/439/LavaLamp-jQuery-Sliding-Menu.html) and other for gallery http://lab.hisasann.com/jStack/, how to enable both of them to work? The problem is within menu bar hover floating highlighter it doesn't appear at all. I don't know how to enable both of them. My code: $(function() { $("#lava_menu").lavaLamp({ fx: "backout", speed: 700 }); }); <!-- syntax --> <link rel="stylesheet" href="http://hisasann.com/housetect/js/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css"
2 problems with this code - show with IE does not work and live() issue
Hi Guys I have 2 problem first problem is that IE is not showing a div when i ask it to do .show() but all other browsers are working fine.on line 350 i have added .css({"visibility":"visible"}); to hopefully fix this issue but it did not. second problem is Uncaught TypeError: Object [object Object] has no method 'live' I get this problem in line # 598 of my code below I am using jQuery1.9.1 if this matters. Thanks for your help I have attach my code in a zip file because the form does not allow
Error $.browser.msie in version jQuery 1.9.1
Error $.browser.msie in version jQuery 1.9.1 Uncaught TypeError: Cannot read property 'msie' of undefined. If I use version jquery-1.8.3 work no problem.
Issue with responisve menu converting to drop down
I have a <ul><li> list that I am using JQuery to convert into a <select><option> drop down, then using responsive CSS to hide it and unhide it depending on browser size. I am having some issues with the code that converts the menu into a drop down. It looks to me like the code is just taking the text and making a list. I am trying to take the href value and add that value to the option value. For example, this code will populate the drop down with the menu items text and their value with no iseeues
A question about Jquery Ajax
When I call Jquery ajax, I get xmldata back and I can have code like jQuery("#tabclasslabs")[0].addXmlData(xmldata.responseXML) If I have a xml text string, how can I parse it so it returns same format as the "xmldata.responseXML"? Thanks
Adding facebook comment box in lightbox jquery
Am having an image lightbox code and i tried to add facebook comment box for every image . The first image goes well with comment box . The Problem is when i move on to next image the comment box keep on duplicating for every image . And the move next move prev also not working it moves to end of the last image in album this problem occurs only after adding comment box any idea about this . (function(){ /* Private variables */ var overlay = $('<div id="galleryOverlay">'), slider = $('<div id="gallerySlider">'),
Problem with clone() and datepicker
Hello peeps. I'm having a bit of a problem with cloned table rows and creating datepickers. I use this function ... Admin.Page.copyRange = function($row){ var $table = $row.parents('tbody').eq(0); var $clone = $row.clone(); $table.append($clone); $clone.find('input.date').datepicker({dateFormat:'dd/mm/yy'}); $("#quotes-table").tableDnDUpdate(); } ... to clone the passed in row and append it to the table. That part works great. When I try to create a datepicker on the
do not trigger mouseout until the cursor is over the element
I will try to explain it as simple as possible... - #layer is initially hided, I make it visible by clicking on #link - Now I want to hide #layer on mouseout, the problem is #link is far from #layer, so I click it and #layer appears, but it automatically hide since at that point the cursor is not even over the element (#layer). I would like to avoid trigger the mouseout event until I can get the cursor over #layer. Hope you guys can understand what I say (stupid language barrier, makes everything
.animate() not running from time to time.. why?!?
I am having an issue where an animate function is not running periodically. so to start with i have a piece of code that listens for a swipe on an element var maxTime = 1000, // allow movement if < 1000 ms (1 sec) maxDistance = 50, // swipe movement of 50 pixels triggers the swipe target = jQuery('.pageSize'), startX = 0, startTime = 0, touch = "ontouchend" in document, startEvent = (touch) ? 'touchstart' : 'mousedown', moveEvent
How can I alphabetize a JSON list and then use JQuery to display it in a table
I have an external JSONP connection working but on the success even, I can't quite figure out how to take the data it has returned and alphabetize it and then show it in a table. Can any one help me with this or point me in the right direction? I'm still new to JQuery.
Bug in IE 10
Hey all, Got another issue (this one might be explainable). Client called in and said our JSON autocomplete doesn't work in IE 10. IE's JavaScript debugger gave me this: SCRIPT3: Member not found jquery-1.7.1.min.js, line 2 character 30636 I've tried 1.9.1 and haven't seen the problem corrected. Is there some work-around available for this issue? Thanks.
Problem with jquery function.
Hallo everybody. I have a problem with a jquery spinner function. It works good just the first time when I click to increment or decrement the value of the school year. I mean the school year changes so changes the previous student school year, where there are some data like previous couse, class and so on. I post the function. If someone would like to help me I'll appreciate very much: <script type="text/javascript"> function provenienza(arg1, arg2) { var request; request = new XMLHttpRequest();
Show / Hide DD
Hello, I have the following HTML: <dl class="Faq"> <dt>Question 1?</dt> <dd>Answer 1</dd> <dt>Question 2?</dt> <dd>Answer 2</dd> </dl> How can I show / hide a DD when its DT (on top) is clicked? Thank You, Miguel
How to dynamically change table data with dynamically created element?
As sooon as I dblclick on table(3 Rows, 3 cols) data the input text appears on that <td> with dynamically allocated ID to that input. As soon as I update text in that input and focusout or press enter from Input text the contents should be updated inside that <td> with that input text. html: <div id="contentsTable" align="center"> <table class="tblData"> <tr class="tblRow"> <td class="tblCol" id="td1">Item 1</td> <td class="tblCol" id="td2">Item 2</td> <td class="tblCol"
I'd like to pay for some jquery input....
Hi all, I'm posting this a 2nd time as I've had no (proper) responses to it first time. I need a jQuery based dynamic database facility to be added to my website. I have no idea how to do it and too little time to learn. I have therefore decided to offer someone an opportunity to earn a bit of money and maybe even get a job later. In the short term, I'll tell you what I need - you come up with a price. If we agree, away we go. The 'winner' will be offered any further work that comes along, but
Show an element base on drop down box selection
Hi I am trying up to shortened my code. Any ideas how to maximize the functionality of these work. please see the link http://jsfiddle.net/AthlonX2/HuQ9A/ I have an idea to lock/unlocked certain fields to shortened up the mark up. thank you, have a nice day
Facing problem in getJSON
Thanks in Advance. I am trying to load JSON file from SharePoint site with url $.fn.AddPeriod = function (param) { var $this = $(this); var options = $.extend({}, $.fn.kpiIndicator.AddPeriod, param); // var url = '/_layouts/UADemo1/Datafile/period.json'; var url = 'http://ddc4-l-6qpnvs1/sites/UpstreamDemoCollection/SiteAssets/Period.json&callback="'; $.getJSON( url, function (data) { // traverse all nodes $.each(data,
How can I reset all fields in a form including dropdowns?
Im trying to reset all fields back the blanks and selectindex=0
Insert new row after a specific row in $.ajax call
I need to insert several rows of data into a particular place from the success function of an $.ajax call to a PHP database query. What follows is the result of a suggestion at StackOverflow and some of my own testing. Currently this only inserts the new table into the space of a single cell immediately after the target row. function GetActorsForSelectedMovie(movieID) { // $.ajax call gets rows from php script var row = $('#tblMovieList tbody tr').find('td input.chkDeleteMovie[value="' + movieID
how to get comeplete asp page html in $.get where the page contails udpate panels too..
hi, can any one suggets. I am trying to get the page html in asp.net using Jquery $.get as below. But as my target page contains asp controls along with asp:update panels i am unbable to display my result html to my req div after $.get result. $.get(url, function(data))
Tablesorter – how to not toggle sort order when switching columns
In tablesorter, when you switch between columns it always toggles the sort-order of that column rather than simply set that column as the default criteria. I expect it to only change/toggle the sort-order of a given column if its selected twice. Is there a way to get tablesorter to behave like this? Can I get it to check if the clicked column is active before toggling its sort-order?
Jquery solution to map print template?
Hi all Fairly new to pogramming & jquery, in at the deep end and learning fast :) I am developing a mapping application (C# ASP.net) and I have a map with several Ajax controls and tools on my default aspx page which all work fine. I am trying to capture the map div from a button trigger (Printbtn) and send it to another HTML page (print.htm) which will be my print template. I am using... <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>So far I have... <script
Dynamically generate table and then add td based upon some condition?
I have javascript method where based on condition I add table and tr. Then based on other condition I call another javascript method where I want to add new td each time. I looked at this link http://forum.jquery.com/topic/jquery-insert-td-before-previous-td But here td is added before to any other td and I want to add on some condition after previous td. If there is any jquery way plz let me know.
Help for making Pi Chart
i want to make a pi chart in jquery
jQuery AJAX return isn't returning PHP data?
I got my index page: <html> <head> <title>YTBypass</title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ requestPage(); $('a[href]').click(function( e ){ e.preventDefault(); url = $(this).attr('href'); url = (url == '/') ? 'http://www.youtube.com'
Finding the element the handler was bound to within handler function passed to on when using a sub-selector
This question is somewhat related to the thoroughly confusing thread at http://forum.jquery.com/topic/event-selector-doesn-t-apply-to-the-original-element-bug-or-feature. If I establish an event handler, like for "click", on a set of elements found by a selector, using on to specify a selector for the actual child elements that should notice clicks, is there any way within the handler to find the specific element that on was applied to? For example, lets say that I have a TODO list, with a set of
What jquery (or javascript) is this
Hi all, I am a student in webdesign and i was wondering if someone could help me with my question. I would like to use effects i saw on a portfolio website : (http://davidluepschen.com/) Could someone help me on how to achieve this? Thx
Checking every radio button
Hey guys I am knew to jQuery and I'm not completely sure if i am using the syntax correctly. I would like every radio button to be selected when I click the on the button. If someone could guide me some where or explain what is wrong with my code much would be appreciated. Thank you. <!DOCTYPE HTML> <html> <head> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <style> </style> <script> $("input:radio").each(function() { if ($(this).attr('checked') != "checked"){ $(this).attr("checked","checked");
Using .load() with selector to get part of a big file versus loading individual smaller files
A buddy of mine is working on a portfolio and he's using .load() to load in content dynamically. His original plan was to have ALL of the content for ALL of his projects (right now that's about 14 projects) in one big HTML file and use .load() with a selector to load only the appropriate section of that file when called. He was having some trouble with getting the dynamically loaded segments to run the <script> they had, and in trying to help him I suggested he have the content for each of his
Auto update textTotal fields
Dear all, I am just a beginner programmer of jquery that still studying. I have a form and it contains these fields. textPrincipal textInterest textServiceCharge textTotal my scenario is. when I input 1000 to my textPrincipal, my textTotal will automatically update to 1000 without going or clicking to other fields. and when I input 10 in textInterest automatically the value of textTotal field will change to 1100 because 10 percent of 1000 is 100. the same thing in textServiceCharge when I input 50,
Why does $("#somediv") === $("#somediv") return false?
It seems that the same selector does not return the same Object so for example the following does not work: var ua = $('#somediv'); ua.minified = true; ua.click(function() { if ($(this) === ua) { alert("foo"); } if ($(this).minified === true) { alert("bar"); }The "if" statements return false. I would like to attach some custom properties/attributes to the object returned by a jQuery selector but it's not useful if the above does not work. For sure the above is a bad usage of jQuery
[jQuery] [validate] onkeyup for single field
This question is in regards to the jQuery validation library http://bassistance.de/jquery-plugins/jquery-plugin-validation/ Is it possible to turn off onkeyup for a singe field instead of the entire form? It'd be cool if I could just put onkeyup=false within the rules array for that field.
Next Page