Help with toggle effect
Hello everybody. I've recently started to use jQuery. I love it very much. I've managed to create toggle effect. When user clicks on the toggle button (for an example the name of the button is "select country"), the object is showing (in this case a map), and when the user clicks again the maps hides, Ok, that's good, but how can I change the word into "Close" when the user clicks on the toggle button? It's not clear for me enough with class .active. I know CSS well, but I don't know how to create
Animate jquery ui slider handle to specific value on pageload
Hi Newbie here. I'm having problems getting a slider to animate to a certain value. The value is within the handle. I want the handle to automatically move on pageload to a specific value. The value has to increment up to the value though. I've created a script in where I'm animating the handle but I can't get the values to increment accordingly. Here is my current script. Slider1: $("#slider1").slider({ max:350, min:100, step:10, value:100, animate: 'true', animate: 6000,
Shorten function, please
Help please to Shorten function, please: Function 1: jQuery(function($) { // Shorthand for jQuery(document).ready(function($) { init1('#buttonOne', 0); function init(selector, count) { //add indicator and hovers to submenu parents $(selector).find('li').each(function() { if ($(this).find('ul').length > count) { $(this).hover(function() { // show subnav on hover $('ul li:first', this).load('pageOne.html');
How to add third submenu? (only an idea please)
Friends I need your valuable help of how to add third submenu? Project working: http://jsfiddle.net/n3fwe/12/ Objetive: (examples: ) or: Where I can begin to change? js: var List = [{ props: { "data-id": "r1-c0-sC0", text: "one", title: "description one" }, sub: [{ props: { "data-id": "r1-c1-sC0", text: "one:A", title: "description one:A" } }, { props: { "data-id": "r1-c2-sC0", text: "one:B",
On Select open url
I have a drop down list that is being created from a UL list. The ul list looks like this: <ul id="quick-links> <li><a href="http://www.test.com/" target="_blank">Test 1</a></li> <li><a href="http://www.test.com/">Test 2</a></li> <li><a href="http://www.test.com/">Test 3</a></li> <li><a href="http://www.test.com/">Test 4</a></li> </ul> I'm using Foundation as my base and that's what changes the list into a drop down box. I'm trying to figure out how to code it tow where when an item
DatePicker StartDate cannot equal to EndDate
Hi, How to disable the date selection so that StartDate and EndDate is not equal. For example, if I selected the StartDate is "16/01/2013", then in EndDate I should only able to select start from "17/01/2013" until current date. And if EndDate is "20/01/2013", then selection date for StartDate should start from any date until "19/01/2013". Below is my code, I don't know what should I add to match with the requirement: $(function () { $("#startDate").datepicker({
Load Dojo from CDN using jQuery
Here is the Dojo example that perfectly works <!DOCTYPE HTML> <html lang="en"> <head> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dijit/themes/claro/claro.css" media="screen"> <script type="text/javascript"> dojoConfig = { parseOnLoad: false, async: true }; </script> <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojo/dojo.js" type="text/javascript"></script> <script type="text/javascript"> /// Require the registry, parser, Dialog, and wait for domReady
How to edit field input in jquery ?
Hi! I need to edit a field input html in jquery. How I do that ? Thanks you!
Forcing attribute title tooltip
I want to force a tooltip on a mouse click. I want to use the default yellow browser tooltip which normally appears when you mouse over an HTML item with a Title-attribute in it. How it works right now is the user clicks on the label of a textfield and then a database call retrieves the tooltip information. Javascript then inserts this information as Title attribute. However when you want to see this tooltip you need to move the mouse a little before it's triggered and I don't want that. It needs
What am I doing wrong?
Hi I'm working in dreamweaver and I have inserted a jquery Tabs widget indo my site. It looks fine in LIVE view but on browser when I upload it looks awfull... what have I done wrong? it shows like this instead of tabs...the GREY area are the(buttons of the tab)
using divs for table-like layout, how to highlight certain divs with jquery
I am using divs to create a table-like layout. I am trying to mimic a table row being highlighted but with a div approach. Is there an easy way to do this with jquery, without throwing id's/classes on every div? I cant think of a suitable css fix. Here is my fiddle
element insertAfter for each instance of class
Hi, I have a series of divs all with the same class. Within each div, are two sub-element divs. With the use of a function I would like to swap round the order of these two sub divs, so the first sub div comes after the second. This is the HTML: <div class="containingDiv"> <div id="first_sub_div">first div copy</div> <div id="second_sub_div"">second div copy</div> </div> Both this: function myFunction() { jQuery(".containingDiv").find("#first_sub_div").insertAfter(jQuery(".containingDiv").find("#first_sub_div").next());
Java-scipt function does not get fired in IE 7 and above versions
Hi, when clicked on below image the ClosePopup function is called. $('#' + popID).fadeIn().css({ 'width': Number(popWidth) }).prepend('<div style="float: right; margin-top: -40px; margin-left: 0px; margin-right: -42px;"><img onclick="return ClosePopup();" src="../../Images/glyphicons_197_remove.png" alt="close" title="close" style="cursor:pointer" class="img_btn_close" /></div>'); It works fine for first three times but does not get fired for the fourth and consicutive times in IE 7 and above versions.
Cookie value changes to much older value on read
For primary navigation on site: http://dangelmayer.com/index_new.php, when clicking into a sub-page from the primary navigation, I want only the selected main category to persist in red until user clicks into a different main category, then that different main category only turns red. To accomplish this, I am using jQuery click function and setting and reading cookies to change my CSS. The cookie plugin I am using can be found here: http://dangelmayer.com/js/jquery.cookie.js <script> $(document).ready(function()
Aligning table columns
I have a page with multiple tables in one zone. The issue is that each table has multiple columns but they are not aligned properly one below the other. I tried the following code but it did not work. $("#rightDiv table tbody tr:nth-child(2) td:nth-child(2) table[name=Name]").css("width","300px"); $("#rightDiv table tbody tr:nth-child(2) td:nth-child(2) table[name=Modified]").css("width","300px"); The tables that I want to target are inside a div id 'righDiv' with the following structure. <div id="rightDiv">
Ajax not returning data after post call
I know there are tons of these questions out there but everything I try seems to fail. Im just sending a simple ajax call and expecting to get something back. Instead the call succeeds but I get no data back. Ideas why? the javascript: jQuery(document).ready(function() { if(jQuery('#statesel').length) { var dataString; dataString = "nonce=" + dynoselect.post_dyno_select_nonce + "&tbl=state"; jQuery.ajax({ type: "POST", url: dynoselect.ajaxurl, dataType: "json", data: dataString, success: function(result)
jQuery.Alerts.js breaks with the latest version of jQuery 1.9
jQuery.Alerts.js (which has methods like jAlert, jConfirm) breaks with the latest version of jQuery 1.9. Errors like $.browser is undefined is being emitted on page load. Any workarounds for the same?
Modifying row toggle code to work with specific cells only
Hi there, I found this code and have currently incorporated it into my site and although its working fine, I'd like to modify it but don't know how! I use it by constructing a html table that looks like: <table class=detail> <tr class=parent> <td>1</td> <td>2</td> <td>3</td> <tr class=child> <td>blah</td>blah<td>blah</td><td>blah</td> Now if I click on any part of the parent row the child row expands. However what I'd like it to do is to only expand if I click on cells 1 and 2. Any idea how I should
Sortable list: How do I save my new list order to mySQL db?
So I can re-sort a list OK, but because I have only scratched the surface on jQuery/AJAX/mySQL - I could use some advice/help on storing my re-sorted list back to my db table. 1. I pull a list of elements from the database table initially. The table has a column for "listorder", numbered 0 - x" 2. using jQuery.ui sortable, I rearrange the list elements on the page now I want to store the new order of elements in the database via a SQL UPDATE statement. Is this the right method? If so, what jQuery
Parallax using jQuery in my web page
I need to ask question. I am sure it is easy once I figured it out or someone on here points me in the right direction. What I am trying to do is keep the header fixed and the parallax image at a default state is as it appears when you first view the page. But here is the kicker....I need the parallax image to move behind the header as you scroll down the page and then the default of the page needs to be with the image showing. I hope I have not confused anyone if you need to ask me a question
Main differences between jQuery 1.5.1 and 1.6
Hi everyone. I am on a tight schedule and need some assistance. I currently use jquery 1.5.1 and have had no issues until recently when IE10 was released. All of my custom built widgets work correctly in all browsers, except for a few in IE10. If I upgrade to v1.6 to test then my problems seem to go away, so my question is what are the major/main differences between v1.5.1 and 1.6 and how would it affect only IE10? I have looked at the changelog but I can't seem to figure it out as my js/jquery knowledge
parseJSON in 1.9.0 is different from earlier versions
I have a situation which I'm unsure is a bug or not. All this is done in Chrome Version 25.0.1364.29 beta-m, and results in other browsers or versions have not been tested. In the latest version (1.9.0) of jQuery the parseJSON function has been changed from the previous version (1.8.3). jquery.validate.unobtrusive.js (latest version (2.0.20710.0) included in the latest ASP.NET MVC package) utilizes this function, in some cases it makes a call that is basically broken down to this: $.parseJSON(undefined)
Order of operations
Hello: I'm having a problem with order of operations, and hoping someone here can help. The routine in question, deletes members from a group, and then displays the new group membership without deleted members. The routine uses two different files, because the select query used for displaying group members is called in other routines within the application. It only makes sense to use the same SELECT statement in the same file (easier maintenance). Following is the snippet of code in question: //========================
how to create slide show using jquery
how to create slide show using jquery
.wrap not working for select elements
I've been banging my head against the wall trying to get (what I thought should be simple) issue resolved. I have an HTML select element inside of a form which I need to wrap with two divs. When I attempt to call the .wrap function nothing occurs. I've tried a multitude of ways and searched Google but I can not seem to get this figured out. Below is a fiddle that has a few of the later ways I have attempted. http://jsfiddle.net/shx5s/
JQuery UI Dialog jumps on top of the page after drugging
Hi Guys, I have quite complecated implementation of JQuery UI dialog. It has the buttons inside. And it is working fine until the user drug it. If the user drug dialog somewhere, it is jumping on internal button click event. I am using jquery-1.9.0.js and jQuery UI - v1.10.0 - 2013-01-17 I've noticed that related bug was regestered, but it supose to be fixed.. http://trac.osgeo.org/mapbender/ticket/765 Thanks
Safari 6.0.2 issue
I am trying to troubleshoot why a simple slide down div isn't working in Safari 6.0.2; Chrome, it works fine. jQuery(document).ready(function() { jQuery("#contact-btn").click(function() { if (jQuery("#contact").is(":hidden")) { jQuery("#contact").slideDown("slow"); } else { jQuery("#contact").slideUp("slow"); } }); }); The div is default display:none and slides down when the user clicks #contact-btn. It's on a wordpress installation running off the Bootstrap framework. All other jQuery works
dependent drop down list remove/add selections
I apologize if this question has already been asked. I assumed it has but I'm not sure of the exact terminology to frame my question. So here it goes... I have a form where I would like a person to choose/rank their top four things from four drop down lists. Can JQuery be used so that when a selection is made in the first drop down list, that selection is removed from the other three? And if the selection is changed, it can reappear in the other three drop down lists? Thanks! Peter T
Apply function on different elements on the same page
Hello, I have this code: jQuery(function(){ jQuery(document).ready(function(){ jQuery.get(jQuery('a.link').attr('href'), function(rank) { var element = jQuery('span.content' ,rank).attr('title'); jQuery('a.link').after('<span>' + element + '</span>'); }); }); }); What the code does is: the address is "a.link" will get the value that is in "span.content" and put that content in front of "a.link". The problem is that there is on the same page more than
Themes
The Theme Roller from the JQuery Mobile site lets you base your themes off pre-existing data themes and call it in your html by data-theme = "a" or whatever. How do you reference the themes created here?
dependent drop down list add/remove items based on selected
I had great help with an earlier post but have yet to be able to modify it to my needs. I have four drop down lists that are used so people can rank their favorite items. When an item is selected in the first drop down list, it then disappears from the 2nd, 3rd and 4th lists. Then when an item is chosen from the 2nd list, it disappears from the 3rd and 4th, etc... That part works great. However, I have two other drop down lists in this form that I do not want affected by this feature. Unfortunately
hover image pop up
I have a main div that has 3 container divs that house images (1 image in each of the three divs). I'm trying to create a mouseover/mouse out function that will pop up a larger image in the middle of the screen. This was an afterthought. :( Is there a way to do this without throwing off my whole page? What would be the best way to do this? Do you need more information? Each picture has it's own ID. <div class="clearfix" id="LayoutDiv2"> <div id="highlte1"><img src="images/HDS1303.jpg" name="brake"
JQuery 1.9 $(array).appendTo(selector) not working anymore?
<ul id="test"></ul> var array = ['<li> abc </li>', '<li> def </li>']; $(array).appendTo('#test') http://jsfiddle.net/wfcvW/ I used to be able to do this in previous version of JQuery. (1.8.3 and older) Did something changed that I missed or is this an issue? Uncaught TypeError: Cannot read property 'ownerDocument' of undefined You can test it on jsfiddle and see for yourself that it works on older version. Thank you for your time.
method load and coorect display cirilic
$("#contentdiv").load("content1.html") content1.html contain cirilic at load content1.html display garbach how too make correct display cirilic without setting browser
latest version breaks plugins & functions
hi folks i routinely use some basic plugins, like cycle for image cycling, and some of the modal plugins like colorbox. i always link to jQuery like this: <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"> but since the latest version a couple of weeks ago - all my scripts have stopped working. i have had to manually link to 1.7.2 or 1.8 for them to work. any idea what happened? thanks!
jQuery the best? OR both and processing(Data visualization)- first post
Hi forum, This is my first post here so apologies if i am unclear regarding the explanation. I am on quite a deadline(within a week). Anyway, i am working on this data visualization project(which will be up soon online). You can see the hair-pulling data here. I have been working with processing for this, and done with 60-70% of the code. But now i am stuck with quite a lot of things. Also, since i can't use java libraries in processing. About mid-way i got to know about D3.js, but it was pretty
navigator.geolocation.getCurrentPosition(onSuccess, onError) problem with android
Hello guys I am deep trouble now a days I any solution regarding the problem please mentioned your review. navigator.geolocation.getCurrentPosition(onSuccess, onError) using android device browser have faced problem Have any solution about this. THanks guys
the img hide,in jquery1.9.0,but normal in 1.7.2
<style> .attion{ width:450px; height:200px; overflow:hidden; border:1px solid #000; padding:25px;} </style> <script> /*$(function(){ $('img').each(function(){ var ww = $(this).width(); var hh = $(this).height(); if(ww>450){ $(this).width(450); $(this).height(450 * hh / ww); } $(this).toggle(function(){ $(this).parent('.attion').css('height','auto') },function(){ $(this).parent('.attion').css('height','300px')
FullCalender events list position
I need to display the events list at specific location in Month view for full calender .can any body help me on this and appreciate for your quick help.
children() - how to use properly?
Hi, I've come up a bit of a blank on this one. The below works: $('a.want_rec').each(function() { if ($(this).attr('rel') == this_user_id) { $(this).removeClass("do_follow"); $(this).removeClass("btn-warning"); $(this).addClass("remove_following"); // make sure we do this so we can now remove
Next Page