[jQuery] tabs collapsed by default on open
Hello everyone. Is there a way to have tabs created in jQuery that are collapsed when the page loads? I use this: $(document).ready(function(){ $("#tabs").tabs({ collapsible: true }); }); to allow the user to click on the tab to collapse it once the page loads. But how do I get the tab content to be hidden to begin with? Thanks very much, Robin HTML for TABS <div id="tabs"> <ul> <li><a href="#fragment-1"><span>One</span></a></li> <li><a href="#fragment-2"><span>Two</span></a></li> </ul> <div id="fragment-1">
There should be an event called htmlToggle.
Hello, there should be an event called "htmlToggle" It should work like this: $(".arrow", this).htmlToggle("↓", "←"); It just toggles the html text, from ↓ to ←... Just like toggle() but with the html text. Thanks, Zerak. GamingToplist Founder
javascript debugging file
i am trying to implement the carousel of ibm can you guys tell me what js file they have used for carousel i tried debugging using firebug but could not find out http://www.ibm.com/us/en/ providing the script tags below <title>IBM - United States</title> <script src="//1.www.s81c.com/common/js/ipadpilot.js">//</script> <link href="//1.www.s81c.com/common/v17/css/www.css" rel="stylesheet" title="www" type="text/css"> <script src="//1.www.s81c.com/common/js/dojo/www.js" type="text/javascript">//</script><link
Custom build of $.Deferred, $.Callback, $.ajax
I'd really like to just have these from jQuery. No Sizzle, dimensions, etc. Anyone know how to do this? I haven't found an independent library or libraries that combine promises with ajax and treat deferred resolution as jQuery does (a non-promise value treated the same as a resolved promise). Anyone have ideas? Thank you!
How to prevent the anchor tag to go to its URL
Hey guys i have an anchor tag in .html page <a id="add" onclick="javascript:openPage()">yes</a> this openPage function is on another .js file and i i also added a code for preventing the the anchor thag when cliked to go to the url but do its task, var openPage=function(){ location.href="http://localhost:8080/magento/index.php/checkout/cart/add?"+id+"&qty;=1"; } $('add').bind("click",function(event) { event.preventDefault(); /*var url = $(this).attr("href");*/ var url="http://localhost:8080/magento/index.php/checkout/cart/add?"+id+"&qty;=1";
Jquery not worked at page load
Hello friends, I want to disable false my dropdown at page load i write it in jquery page load but not worked please suggest me where it is wrong my query mention below $(document).ready(function () { $('#<%=ddldropdown.ClientID%>').attr('disabled', false); });
e.data syntax problem
Hi, it’s always me with those e.data syntax problems :-) I am trying and searching in the web for weeks now, but I cannot find a solution which in my eyes got to be very very simple. I currently use e.data in situations where I bind it like: $(window).on('resize', {zoom:2.4}, size_element); function size_element(e) { alert (e.data.zoom); } So far, so good. Always works fine. But what if I wished to pass e.data in a situation as: function example(){ ... size_element(e); ... } or: $(document).ready({zoom:2.4},size_element);
PRBLEM IN JQUERY alert() AND OTHER STUFF
Hey every one!! I have a html page having to anchor tags and a script which gets url variable and one of the anchor tag work with that variable and other anchor is just like a back button.the issue is the alert function in the script is not working i.e it does not alert any thing secondly the 1st anchor tag “yes” is not working the way it should work means I am unable click the “yes” tag and when I refresh the page the cancel button stops to work too.i can not figure out what I am doing wrong. The
how can I bind event on the element in iframe.html
It is does work: parent.html $(document).bind('sap',function(){}); iframe.html parent.$('iframe').trigger("sap"); This is does not work: parent.html $(__iframe[0].contentWindow.document).bind('sap',function(){}); iframe.html $('button1').trigger("sap"); how can I bind event on the element in iframe.html,Tks
Help with Jquery updating labels after a title match
Hi guys. I have some code below which works brilliant for title matching products from manual input: $(document).ready(function() { $(".course").autocomplete("get_title_list.php", { width: 260, matchContains: true, mustMatch: true, selectFirst: false }); $(".course").result(function(event, data, formatted) { $(this).next(".course_val").val(data[1]); }); });And the update part : <input type="text" name="course" value= "Find Title In DB" class = "course"/><input type = "text" class ="course_val"
Picture hover linked to menu link hover in jQuery
I have the following code on a site, but it doesn't work yet. I think I am close, but the classes of the <a>links are not getting the Active state when hover. It is the meaning that the hover over <picture> gives the corresponding hover over the name link and vice versa. Can anybody help me out, please? Thanks in advance! <script type="text/javascript" src="jquery-1.6.1.min.js"></script> <style> a.MedewerkerPicture Active { color: red; } a.MedewerkerName Active { color: red; } </style>
ReferenceError: function not defined... unable to fix.
hey guys!! i am having a ReferenceError:openPage() is not defined in my error console of the browser.i can not figure it out. help me please.the code is: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <link rel="stylesheet" href="./style.css" type="text/css"/> <script language="Javascript" type="text/javascript"> function getUrlVars() { var vars = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value; });
How do I extract a sub-array from a multi-dimensional array
Hello Everyone: My goal here is to extract a sub-array from a multi-dimensional array. As users select and unselect a checkbox the array needs to be added to or subtracted from. Details follow: catch_array = jQuery.parseJSON($(this).val()); catch_array variable picks up value of the checkbox. The value is an array of fields in the table row, (firstName, lastName, email, userID, etc...) Next If routine should add to the data_row array or subtract from depending on whether a user selects (or unselects)
Why ~.bind("click", event) event occurs automatically?
function pop_record_window() { $('#start_and_stop_rec').bind("click", function() { record_voice(); } ) As I call the function: pop_record_window(). The record _voice() automatically runs... What happened? I don't click the button: "start_and_stop_rec". The feature of bind?
drag and drop with iscroll on desktop
Hi, I am using iscroll and wants drag and drop features in my application. This works fine for Ipad and android devices but not working on windows desktop. can any one help?
How can I access tables row cells using jQuery
A table like the following haw would I access the cells of a row? <table id='mytable' > <tr> <td><input id='chkbx0' type='checkbox' checked /></td> <td>Boston</td> <td><input id='ch0' type='text' value=23 checked /></td> <td><input id='chkbx0' type='checkbox' checked /></td> <td>Charlestown</td> <td><input id='ch1' type='text' value=33 checked /></td> <td><input id='chkbx0' type='checkbox' checked /></td> <td>New York</td> <td><input id='ch2' type='text' value=3 checked /></td>
Tabs in ajax not showing second time
I use an ajax function to get some data out of my database, i load the data in a new view which will be loaded in a <div> in my current page. in the view i load i use jquery ui Tabs to display the data. When i call the ajax function a second time the tabs dissapear and i just get the links and the <div>'s without a layout, can someone explain me how to solve this?
jQuery .ajax problem
Oh boy is this a doozy. I have a <div> on a page that needs to have it's text updated as a result of a ajax all to the server. $('#reportDiv').text(ReturnUnidentfiedItems()); ReturnUnidentifiedItems() makes an ajax call back to the server to get a formatted (html) list of Items. There are 2 problems with this code. Here is the code. Note the comments I have added after the alert() calls. function ReturnUnidentfiedItems() { var x = ''; $.ajax({ url: '/Search/ReturnUnidentfiedItems/',
Reloading a div
Hi, I am using a Ajax to call a PHP script in order to authenticate users on my website. Depending on the response returned I am displaying one of two divs (success or failure). If the login is successful I want to display the name of the authenticated user within the welcome message on the relevant div. My thoughts were to set a PHP SESSION variable in my login.php script and then reload the success div before I display it. Here is my code: $.ajax({ type: "POST",
Need help with some code
Hi, I am trying to make this script rotate the links along with the images but i can't seem to get it to work :( http://jsfiddle.net/chrisackford/NDh7d/2/ e.g. i want the "a" to be shown then the image fades out and is replaced with the next "a" and the the first child is appended to the end of the .slide-front div I have got the script back to a functional state Anyone got any ideas? Many Thanks chrisackford
Please identify the image slider used here
Can anyone identify what image slider is used here on this Wacom tablet page: http://www.wacom.com/products/pen-tablets/intuos/intuos5-touch-medium I did check the source code, it mentions "anything slider", which I googled, but the anything slider does ont seem to have those cool zoom in/out slide left/right effects on that Wacom page, or resemble the style featured on that page (caption, row of buttons, etc). An identification on what slider was used on that page, or a similar slider that supports
event problems
I want to put a click event on a button i have given the button an id of "button" in the html but i cant seam to make the jquery work i have tried both of the following $("#button").click(function(){ alert("test"); }) and $("#button").click(kitten()); function kitten() { alert("test"); { and neither version works. note that if i change $("#button").click to $(document).ready then it it does work (for both versions of the code) so why cant i make click events work
Problem with alert().
hello guys!! someone please help me with my problem. i have html page having 2 <a></a> tags and a script which gets url variable and one of the anchor work with that variable and other is just like a back button.the issue is the alert() in the script is not working secondly the the 1st anchor is not working according to the script means i can not click that anchor.here is the code: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <link rel="stylesheet" href="./style.css" type="text/css"/>
Why should $.browser have to be deprecated?
I always see $.browser is deprecated and get asked to use $.supports instead. But they are different things. One gives you the browser version, the other gives you the supported features. I have two major use cases for $.browser in my application: My organisation only tests the application against certain browser versions (e.g. IE8+, Safari 5.1+, etc) If someone has a lower version, we want to display a message saying that the application has not been fully tested against your browser version and
Example for JQUERY using JSON
Hai...Can any body explain how to get data from the server and maket that data as JSON Object? Please explain with simple example?
Pagination with jqGrid
I'm using jqGrid 4.4.0 with paging enabled. When I type, in the page number input (in the paging footer), a page number that does not exist (e.g.: Enter the number 30, but there are 2 pages) jqGrid shows a page with no record. Can jqGrid show the last page with recorda (in my example, page 2)? If yes, how can I do that? Could anybody post a snippet? Many thanks in advance. Victor Rodrigues Nunes
How to trigger video to play when link is clicked, and then pause again using the same link?
Hello, With jQuery can I trigger a video to play and then pause when a single anchor is clicked on? I have a page with 5 videos on it, I don't want to use the controls on the videos themselves, thinking of putting an anchor next to each which will say play. Click it the video plays, the play text changes to pause, click it again it pauses and returns to play again. you can see this page at http://kimcolemanprojects.com/djangolive_1.html Thanks
popup like PINTEREST Repin
I am new to Jquery I want to implement a popup like PINTEREST Repin popup,it is very nice... If you click the repin button(after login) the popup will go to center with animation(flipping) and the origin div will hide.... I searched about that in google but I can't to find any popup like this. Any one please help me..... Seems they used JQuery & JQueryUI & css3 (Transform)
Open window in chrome from IE or FF?
Hello, Is there a way to open a popup in chrome from IE or FF? I need to be able to use webkit.
full screen changing background
I want to make full screen background of images that change by fade. The problem is that I need only part of the screen, on the top and the bottom of the site I have divs with menu and footer so only part of the screen will be used for the images. I need the image width will fill the screen but I need the height not fill all the screen, also I need this work on any resolution and also work on the iPad and similar devices. I do not want scroll bars to be shown. I need something like this: <div> menu
Add 'dim' class until particular DOM element
Hello, I have a rather simple problem (I think) but can't seems to find a simple solution. I have a table and one of the cells has a 'today' class. <table> <tr> <td>1</td> <td>2</td> </tr> <tr> <td class="today">3</td> <td>4</td> </tr> </table> Now I have to add a 'dim' class to all the cells before '.today', that's it :) Of course, the table is dynamic (it is a calender). My solution was to get the index of 'td.today' and then
Dropdown selectrd index enable true false using jquery
I have 3 dropdown in my form i want to enable true or false at the time of dropdown selected index using jquery how can i write it ?
keyup strange problem!!!!!
HTML CODE: <div id="header"></div> <form> <input id="target" type="text" /> <input id="target2" type="text" /> </form> JQUERY CODE(Test 1): $(function(){ $('#target').keyup(function() { $('#target2').attr("value",function(){ return $('#target').val() ;}); }); }); JQUERY CODE(Test 2): $(function(){ $('#target').keyup(function() { $('#header').html("<h1>"+function(){ return $('#target').val()
How to find element which caused event because of jquery .live
How can I find ID of the element which caused an event as a consequence of .live (jQuery method) ? The following is an example : $("form[data-f=true]").live("submit", function (evt) { /* If I have <input type="submit" name="Submit1" data-f="true" /> and this button is clicked, then I want to know it's Submit1 button. */ }); I tried evt.target but it returns information about the form not about the button which was clicked. Many thanks
Please help completing this slider code I am stuck.
Hello, I am makeing this neat slider. You click the links and the slider comes out but when I click the same link twice it comes back. I need to not have it move when it is clicked twice. For a better I dea of what I need Take a look at my code: and here is a site that has the effect that I want in flash(I know this is j query and not flash this is just an example:http://artistecard.com/JBoog <script> $(function () { var current $("#aOne").click(function () { trade($("#div1"));
Fire a event onChange every time
Hi, I have this piece of code to fire a event when a onChange events occur but I need to change to different option every time: $('#search_by').change(function(){ if($("#search_by option:selected").val() == 4) { $("#date-selector" ).modal(); } }); But I need to fire the event every time I click the select option with value 4. Any help?
set value toFixed on blur
I have an input field that is used to insert a dollar amount. If the user types in "100" or "100." I want to add two decimal places to the value using the toFixed(2) method. This is what I'm trying, but it is undefined. var j$ = jQuery.noConflict(); j$(document).ready(function(){ var ccAmt = j$('[id$=Credit_Amount]').blur(function() { ccAmt.text( value.toFixed(2) ); }); }); Thanks for any help.
trying to use $.post
I am trying to use $.post() to perform ajax functions the bit i am having difficulty with is the callback function all of the pieces of documentation i find for it (i have read several) give examples with this syntax. $.post("demo_test.asp",function(data,status){ alert("Data: " + data + "\nStatus: " + status); }); as you can see the function is defined within the $.post() parameters. however i dont like writing my functions into the properties of jquery methods like this because i think it
jquery trigger click problem
I had a problem getting jQuery to work at all on the page. I found some code which helped me get it to work (see function below). I tried to add the line $('#firstpic').trigger('click');Although it doesn't break, it doesn't work either. What I want to happen is that the id firstpic would be clicked when the document is ready. This will bring up a pretyPhoto slide show. <script type="text/javascript" charset="utf-8"> ( function($) { $(document).ready(function(){ $("area[rel^='slideShow']").prettyPhoto();
JQUERY Random Multiple quotes rotator needs tweaking
I'm struggling trying to make my multiple quote rotator working the way i want it to. I have a JS fiddle up and running : Jsfiddle - Multiple Quote Rotator My problem is that i would like my 6 quotes to appear one after the other with an animation. All i can manage is a global fade in fade out... Am i making sense? Cheers,
Next Page