Store arbitrary with data()
Can somebody help me understand data() and give a easy to understand example?
Do I need to download jQuery?
I know HTML, CSS, and JavaScript, but I want to learn jQuery. It says it is compatible with all browsers, so without downloading jQuery, can I write jQuery code in my text editor, then run the code properly in my browser. If I have to download jQuery to create jQuery code, then do other people have to download jQuery for the code to run properly on their computer?
Automatically flip
Hi, I'm reading this article like how create a " Flipping Circle Slideshow " http://tympanus.net/codrops/2013/01/28/flipping-circle-slideshow/ and i want to make it flip automatically. This is the code to flip automatically but i dont know how to figure out run this code well. please could you help me This was they told me to do. before you initialise the plugin, eg $(element).flipshow(); you can add a public method named navigate and then call it from within a setTimeout function. $.Flipshow.prototype.navigate=function(element,direction){
Synchronized Tabbed navigation
I have two tabbed navigations, one on the top and one at the bottom. I'm targeting the div through classes instead of id so that they both show relevant content. When the user clicks the "Business" tab, it shows relevant information for the user, both on the top and on the bottom. My problem is that I cannot make both tabs to show the "active" state. It only shows on the tab that I clicked whether on the top or the bottom, although they have the same class name. Any help is welcome. Mike HTML: <ul
How can execute the print command in chrome?
How can execute the print command chrome and don't need click print or [enter]. <script type="text/javascript"> window.print(); window.onfocus = function () { window.close(); } </script> Please help me! Mr Lam
CSS problem
hi all, The icons can't display on http://api.jquery.com . There miss a token "," in file http://api.jquery.com/jquery-wp-content/themes/jquery/css/base.css?v=1 at line 1205. sorry for google translate... regards.
Some jQuery code not working (.toggle is to blame I think)
I'm following along on O'Reilly's Javascript and Jquery but some code in the book is not working. I've searched the net but haven't came across an obvious answer. Any help would be appreciated. The HTML is here: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>A One Page Faq</title> <link href="../_css/site.css" rel="stylesheet"> <script src="../_js/jquery-1.7.2.min.js"></script> <style type="text/css"> h2 { background: url(../_images/open.png) no-repeat 0 11px; padding: 10px 0 0 25px;
Edit serialize array
Hi, I used $("#myform").serialize and its giving me return somethink like below: customerid=1&customername=raheel&customerage=23 i took all this id var data. but i want to send data via ajax without the first input field so it should remove customerid=1 ... how can i do this ? Thanks
Accordion works perfect (almost)
Hello, Being a newby to jQuery, I would appreciate your help with the following. What I want to create is a webpage with a number of Titles, each followed by a div containing one or more paragraphs, maybe a bulleted list, an image, etc. Each title must be clickable to expand/collapse the div belonging to it. When expanding a div, other expanded div's (if any) must collapse. I found the example on http://viralpatel.net/blogs/create-accordion-menu-jquery/ and tested. It does almost exactly what I want.
JQuery with Adobe Edge integration
Afternoon all! I'm in desperate need of some urgent help please! I'm a newbie so please be gentle! I have a document with lots of pages to swipe through: <div data-role="page" id="page1" data-theme="a"> <div data-role="content"> Content here... </div> </div> But as soon as I add my Adobe Edge library's and the code: <div id="Stage" class="EDGE-52195119"></div> in-between my content DIV, NOTHING happens at all? Nothing shows up and I have no idea why? Has
If condition in Jquery
if condition not working I don't understand why, function slide(str){ alert(str+'<<<str'); <<<< this Alert is working file and showing output [ next<<<str ] if(str=="next"){ xp+=1462; alert("if"); <<<< str value is next but if condition is still not working and not showing this alrt; if(xp>=5800){ xp=0; $('imagecontainer-two').animate({left:xp},1000); } }else if(str=='back'){ }
I have to show this JSON data and also if i add extra data in JSON it must shown in HTML without refreshing the page
This is my JSON data. { "Facebook": [ { "facebook_name": "Apple", "facebook_post": "Apple posted a photo", "facebook_comment": "Apple commented on a photo" }, { "facebook_name": "Mango", "facebook_post": "Mango posted a photo", "facebook_comment": "Mango commented on a photo" } ] }
Where to put the formateDate function of the datepicker?
I have a datpicker and i want to change the Format. i know that i have to use the formatDate function, but where do i put it? <script> $.datepicker.formatDate( "yy-mm-dd", new Date( 2007, 1 - 1, 26 ) ); $(function() { $( ".datepicker" ).datepicker(); $( ".selector" ).datepicker({ dateFormat: "yy-mm-dd" }); }); </script>
Find TD Value
I have a table with an ID of #MyTable and every row in the table has one column with a class of .tdSize and another column with the class of .MyCheckBox that contains a checkbox. When the checkbox is clicked, I would like to get the html of the .tdSize just for the row where I clicked on the checkbox. The following gives me every rows .tdSize. How do I ony get the row where I clicked on the checkbox ? Thanks $(document).ready(function () { $('.MyCheckBox').change(function () {
jquery help, need expert solutions
I am trying to figure out how to use jquery for something like the following, here is what I want the script to do, before the page loads (DOM) I want the script to look on the page if there is a table row(tr) with a table data (td) with only a single number 1, 2, 3, or 4 like below then it will click the button whose number corresponds! so in the example below there is 4 buttons each with values 1, 2, 3, and 4! notice that in the first td there is only a single number in it "4", so the script would
Fill Div with inputed text
I have the following and it works - everytime I hit the Button it adds the word Text under my button <title>Test</title> <script src="http://code.jquery.com/jquery-1.10.2.js" type="text/javascript"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $('#btnAdd').on('click', function () { $('<p>Text</p>').appendTo('#Content'); return false; }); }); </script> </head> <body> <form
Dialog Help Please!
Hi all! I'm new to JQuery so please bare with me and forgive my ignorance as this maybe a very basic question! I'm 'trying' to develop an app in Dreamweaver and currently have some nice pages that you can swipe through. No problem so far! But, in the middle somewhere I have a page that has two dialog 'pop-up' links on it that work ok! Still no problem! ...BUT, when I try to swipe past that page, it swipes to the two 'dialog pages' also, which I don't want. I'd like it to swipe from article to article
Pop-up retrieving images randomly from a folder
Hi everybody, I'm a newby in Jquery and I've used it in a website I'm workin on with draggable scripts. Now I'm facing a new challenge :) I want to make pop-up images taken radomly from a specific forlder on m y server. Cn anybody suggest me some resources? Thx and cheers! Paolo
which jQuery library I should use to execute this animation
Salaam friends, I'm a beginner in jQuery ,I wana execute an animation but I don't know which jquery library I should to use I attach this two images to explain what I want : in image1 the content of my page contains two div ,in div1 when I click on one of the rectangulars I want the div1 and div2 move with an animaton to the left slowly, to cause hidden the div2 and replacement div1 in the place of div2,and display another div :div-details to locate in the place of div1 to the right of content>>the
Getting Started with JSON's and php
I had been using xml for a while now. At the beginning of the week I had an idea to send data as a string in a format like a javascript object. I didn't know it was called a JSON. The next day I was reading through lxer (a linux news site) and came across an article on using php with XML or JSON. Since I didn't know what a JSON was I looked it up. Wow just what I wanted to use. It only talked about using it from a file where as I wanted to use it more like ajax. I was looking around for documentation
Need help in creating a basic plugin
Hello every body i want to create a basic plugin in which whenever mouse is hovered over an image its opacity will change but the problem i'm facing is that i'm not able to add mouseover effect in my plugin... The plugin is shown below (function($) { $.fn.imageHoverOverText = function(options) { var defaults = { "width": 200, "height": 50 } var parameters = $.extend(defaults,options);
Looking for a plugin but I don't know whats it called or what to search for
Hi All, First post here so please bear with me :) I'm looking to load another website into my site (I'm using ASP.NET MVC4 if you were wondering) and then somehow make all of its nodes click-able (if possible right click-able so that I could show a context menu) for example a clients wants to tell us where is his website logo and a company name, he will tell us his url, our site will load that URL and somehow enable the context menu so that the client can click or right click on their logo and tell
JQuery: global vars don't work
Good morning, i'm learning JavaScript and JQuery and i have a problem in defining vars. In this code, on page load i load an external file using JQuery's Ajax methods, therefore i'd like to assign its value to a var to use later. Unfortunately the syntax i'm using seems not work so i cannot, obviously, understand why. Here the code: $(window).load(function() { $.get('http://localhost/_SandBox/JavaScript/Learn-JQuery/_SourceCodeFromPackt/Chapter%206/exercises-content.html', function(data) {
Help with interactive slideshow
Hi, i made an interactive slideshow with the help of other users here that allows you to slide the current image and another user on their own end can see the changes in real time. The page kinda works its just that it gets stuck after a while. I use jquery to have the page continuously read a value stored in an external txt file which contains the ID of the current image so it can detect when it changes and slide to that image. However seems like this method overloads the page and thats what makes
difference between ("#btn").click(); and ("#btn").button.click();
i am new to jquery can someone explain what is the difference between ("#btn").click(); and ("#btn").button.click();
css properties at jquery selector do not work when Infinite Scroll load new elements
This is my code: $('.home_post_box').hover( function() { $( this).find('.home_post_text').css({ 'visibility':'visible', 'opacity':'0.9', 'transition':'visibility 0.5s ease,opacity 0.5s ease', '-o-transition': 'visibility 0.5s ease 0.5s,opacity 0.5s ease' }); }, function () { $(this).find('.home_post_text').css({ 'visibility' : 'hidden',
how to pass clicked image id to jquery function?
Hi, i have to show image in the dialog box based on the user clicked image.So that i have to pass the clicked image id to function.(like passing parameter to javascript function).I dont know how to do this in jquery.Can anyone help me? $(function () { $("#dialog").dialog({ modal:true, autoOpen: false, resizable: false, width: "auto" }); //var id= $(this).attr('@Model.Id') $(".dialogify").on("click", function
Dynamically calling multiple Dialogues with different values
how to assign values to new dialogue my dialogue function showAccessId(value){ dialog = $('<div id="details"></div>') .html(bodyOfWindow) .dialog({ title:'Details', autoOpen:true, width:600, closeOnEscape:true, height:330, beforeClose: function(event,ui){ dialogueOpened=false; } $('#accessId').val(value) }); } bodyOfWindow="Access Id is : <div id='accessId'> " ; Now for me i will call the function several times .... first time i will have dialogue
Gridview Overlay
Hi to all, as an asp.net developer and relative jQuery newbie, I have run into a design issue with a project that I am working on. The requirement that I am working on is as follows: Display a series of timed activities for a specific day on a grid view with time on the x-axis (in minute / 5 min blocks) and location on the y-axis, I need to show if the activity started / finished - early / on time / late and also timing details for sub activities contained in the main activity. I have two issues
Hide datatable initially
Hi, I am new to JQuery and I'm sure I will be asking an obvious question :( I want to initially hide a datatable when the page loads, and once the user click on a button then show the table with the results, note that the table will always remain after they once click the button. I tried the hide() command within the ready function but the datatable is always hidden. $("#reviewcases").hide(); This is what I have which always displays the table initially: $(document).ready(function()
accessing global variable in a function and putting this variable's value in ajax
var preCounter = 0; var counter = 0; $("#addQ").click(function(){ $.ajax({ url : "qtemp.php", type : "post", data : "axn=qtype&cntr="+counter+"&pcntr="+preCounter }).done( function(msg) { }); }); });'preCounter' is not passing value in ajax while varible 'counter' passing value. please help me, thanks in advance
on change post()
I'm reading from MySQL and populating an array to be able to edit cells. <td> <input type="text" name="id" id="id[$counter]" value="<?php echo $id; ?>" onchange="post()" </td> <td> <input type="text" name="item" id="item[$counter]" value="<?php echo $item; ?>" onchange="post()" </td> <td> <input type="text" name="price" id="price[$counter]" value="<?php echo $rprice; ?>" onchange="post()" </td> function post() { var id = $("id[$counter]").val(); var item = $("#item[$counter]").val();
Sliding From left to right always with out back slide from right to left ?
Hi there and really thanks all you for this forums Im new in jquery and I design a slide show that slides from left to right but when it comes to end or 5th pic it begins to slide back from right to left but i want it slides from left to right always and always this is query code please help me how to fix it that always slides from left to right and has never back slides from right to left ? the query code and query link is : <script type="text/javascript" src="jquery-1.2.6.min.js"></script> <script type="text/javascript">
Show larger photos
I'm a retired programmer trying to keep up with technology. I have a travel blog with photos on which the viewer can click on to view a larger version. Right now I use an old-fashioned anchor tag that creates a new page. I've noticed a new way to show larger images where the large photo is on top of the original page while the original page is darkened and in the background. The large photo can be dismissed and the original page "undarkened" by clicking on a button or hitting the ESC key. Can
Retrieving and updating data
Hello All, I'm using Jquery Ui datepicker with ZendFramework version 1. When I enter new data on date fields the datapicker component works fine. When I try to retrieve data from the database and fill the date fields on the page I'm sending to the user, the date fields aren't filled with the database informaton. Could u please explain to me what should I do before showing the field to the user? Kind regards JDC
removing scrollbar from textarea
I am trying to remove the scrollbars from a textfield. textfield has a class "textbox" Is this the right way to do it? $(".textbox").css("overflow", "hidden");
jQuery button with 3 possible values - multiple clicks
Hello, I would like to create a button that can be clicked several times and whose value will change at each click. 1) Original stage : button with text "Maybe", button color = grey -click- 2) button with text "Yes", button color = Green -click- 3) button with text "No", button color = Red -click- 4) back to Original stage : button with text "Maybe", button color = grey etc... How to do this? Thanks
meaning of using + operator after += operator
Hi, in 1 of the code, i found the following: sum += +new_price; What is the meaning of using the +operator in front of new_price variable after using += operator? Thanks PhpDev
How I can Get a substring from String using JQuery
Hi, I have the string 'demo1/UploadedImages/Container1/Imagename.jpg'. Now I want to get the string 'UploadedImages/Container1/' as a string and 'imagename.jpg' as string individually. How can I achieve this using jquery.. Please give quick reply.. Thanks in advance..
How to trigger an analytics event on a page scroll ?
After checking a couple of forum and trying different script, I still do not succeed to trigger an analytics virtual pageview for a scroll down on my test page. The page is http://2eurosocks.com/test-scroll.html. The JQuery file is jquerytest.js I'm trying to use the on scroll function when a user reaches the div id=pageBottom. Could anybody have a quick look and tell me what I am missing please ? Thanks a million.
Next Page