Get Markup of Clicked Image Element
Hi all, I'm trying to get the markup of any clicked image by wrapping it in a span element using the wrap() method. The wrap() method allows you to wrap any text around any specified selector. Then I tried to use the html() method on the span element to get the markup of the clicked img element. I plan to later remove the span tag and temporary id but so far it,s not working. Below is what I have tried. $(event.target).wrap("<span id='tempSpan'></span>"); imageMarkup = $("#tempSpan").html(); Please
tweetable.js
Hello Everyone, I'm new to js and programming and struggling with this: <!-- Footer Col. --> <div class="col-md-3 col-sm-3 footer-col"> <div class="footer-title"> Recent Tweets </div> </div> <script type="text/javascript" src="jquery.tweetable.js"></script>
Porting a dating site to jQuery (later mobile app)
Hi, i did a small dating site which runs on HTML/JS/PHP/MySQL. I would like to port it to jQuery (and later via Phonegap into a mobile app). So far i did the (jMobile) layout with multiple pages and it works well. But i struggle with the login/sessions/cookies for example. Is the session handling still part of the PHP-backend or do i need to this directly in jQuery? How would you design a dating site/community/social network with jQuery? Thanks! NBG1
Checking if selected value disabled
I am trying to check if the selected value is disabled in a select field. Here is my code: if($(this).attr('disabled')){ alert('Disabled'); }
Change div text on click
I have been trying to work out how to change the text inside the div when the button is clicked in the same fashion as the button text is responding. jsfiddle I tried changing the if / else to act on the div rather than the button like so - if ($(".stileone").text() === 'Yellow Box') { $(this).text('Red Box'); } else { $(this).text('Yellow Box'); } but it did not work. How might I change the text in both the button and the div on click please. Any clues would be appreciated
Form select chain event
Hi, i have 3 select boxes which contain categories, sub categories and a further sub category. Is there anyway i can do a chain event so the last 2 are disabled but the first one is enabled. Upon selecting a category in the first form select the second form select becomes available. Then once the 2nd form select has been selected this makes the last one become available. I have created a fiddle of my select boxes - http://jsfiddle.net/L4t83nvz/ Any help with this matter would be greatly appreciated.
Set height of each tables = Tallest table in class
Dear All Objective Set height of each tables = Tallest table in class JQUERY used is listed below ... it is not working <script type="text/javascript"> $(document).ready(function() { $.fn.delay = function(time, callback){ // Empty function: jQuery.fx.step.delay = function(){}; // Return meaningless animation, (will be added to queue) return this.animate({delay:1}, time, callback); } var maxHeight; //<<<------------------------------------------------------code start from here $('.testimonials').each(function()
Divide a long html page into smaller pages
Hi all, I'm very new to jquery, and I want to know if I can use it to turn a long html text into shorter 'chunks', like pages of an ebook. Every time the user press a 'next' button, the next 'chunk' of text is load out on the screen. If such thing is possible with jquery, what should I read up to code it? Here is an illustration, hope it will make things easier to understand.
Adding and Removing Attributes of Elements in Iframe
I am trying to give elements on a page inside of an iframe a temporary ID if they don't already have one when they are clicked. I was able to add a temporary ID but I cannot remove it and give it to another element when it is clicked. The following are sample markup and the code I have used to give each element a temporary ID if it didn't already have one when clicked. <div> <p> Sample1</p> <div> Sample2 </div> <span> Sample3 </span> </div> var myTarget ; var targetID ; var modifiedElement ;
Dropdown Menu compatible with mobiles
Hello, I have this script which have two dropdown menus to go to a specific url. var getURL = function(){ var option1 = document.getElementById('dropDown1').value; var option2 = document.getElementById('dropDown2').value; var URL = 'http://www.domain.com/' + option1 + '/' + option2; if ((option1==2) && (option2==2)) { var URL = 'http://www.domain2.com/'; } location.href=(URL); } <select id="dropDown1"> <option value="1">1</option> <option value="2">2</option>
Multiple validation Select Box
The idea is to validate all the 3 select boxs and if the user dont chose any option in any box he display a label below saying "that champ is need". I can do for one select but I dont know how to do for the 3 at the same time. HTML <div class="all_3_boxes"> <div class="dateNaissance"> <div class="inner"> <select id="selJour" name="subjectJour">
Really Struggling...
Hello I've been trying to learn JQuery from a book I bought and it all works when I use their code samples that I downloaded. However when I try to take it into my own project, it doesn't work at all. Basically, when I click the Events tab at the top, a dialog box should open. It doesn't. Instead the dialog text is on the page initially. Please help!! http://www.jameswinfield.co.uk/Emma.html
Animated Dialog Center
Hi, using the Animated Basic dialog the popup window opens in the center of the screen. But closing it, (only) at a screen width of 1920, the explosion of the popup window starts at the right side of the screen. Any idea? Regards Thomas
Popup on key up
Please excuse me but this is my first time that I am exposed to Jquery. Could you pleasE help me with this, which I am sure will be straight forward to you? NOTE ............... $row3['service'] IN SEARCHEXEC.PHP DISPLAYS ON THE POPUP BROWSE WHEN I TYPE AND FILTERS ON KEYUP. WHEN I SELECT A RECORD IT SELECTS THE COMPLETE ROW IN SEARCHEXEC.PHP echo '<a href=home.php?id=' . $row3['mem_id'] . '>' . $row3['fname'] . "</a>\n";AND CALL HOME.PHP I WANT TO DISPLAY ONLY $row3[‘fname’] IN LIVE.PHP IN TEXT
Dynamic dropdown list with append method not working in Internet Explorer
Hi guys, my problem is that in ie11 my dynamic drop down select list not showing at all!!,, i mean that in all browsers is working except ie11,, i m using append method like that function loadDynamicDdl(ajaxUrl , ddlId) { $.ajax({ dataType:'json', type: 'GET', url: ajaxUrl, cache:false, // async:false, success:function (response) { var ddl = $('#' + ddlId); ddl.empty(); var opts = response.Options;
What does J stands for in jQuery?
though i m not new in jQuery but I wonder, What does J stands for in jQuery? JavaScript? or John(founder of jQuery)? I read alot of blogs and forums someone was saying JavaScript and someone was saying John, but didn't find any authenticated resource. beg you pardon to all for such non related question. Answer will be highly appreciated. Thanks in advance.
undefined value working in jquery 1.8.3 but not in 1.9.1
in 1.8.3 my flow goes in to this if condition but not in 1.9.1 var order_node = $('div.oe_website_sale_tx_status'); if (! order_node || order_node.data('orderId') === undefined) { return; } if `.data()` is changed in new version. **HTML** <div class="oe_website_sale_tx_status" data-order-id="order.id"> ..... ..... </div>
3-d image viewer
i need 3-d image viewer but with image drag and drop features.i searched on the net but not able to find out such type of jquery plugin.
Trouble with click event
Hi there, I'm relatively new to jQuery and I'm struggling to understand a problem I have with my event bindings. I've created a toggle to show/hide the inner info of a three divs. The functionality was ok if none of the sort buttons at the top had been clicked. If however, any of the top buttons were pressed, the toggle no longer worked. To try to get around the problem I've put my function inside another event, but don't know how to remove the original without errors. To try to demonstrate I've
Hepl for very beginner for remote validation
Hello everyone , I recently found jQuery . I am beginner , very beginner I learned to use jQuery validation for input form , but I can not run remote validation . I need to check if a file exists in a directory, before the file is uploading by the user Can you suggest the very simple code to learn the basics of this validaton method? I found many files in the net , but they are very difficult to understand for a beginner. Thank you in advance Roberto
Adding another level to a drop down menu using spf-dropdown.js within a Sharepoint Foundation site.
I'm using jQuery and spf-dropdown.js to add a dropdown menu feature to a Sharepoint Foundation 2010 site. One sub level is working fine but I'd like to add a 2nd sub level. As is, the code adds a class to menu items (marked with a special identifier) and traverses back up the dom to append a new ul to items that don't have that class. If I add a new identifier and class for a 2nd sub level, it doesn't work as it does for the first sub level. So the problem I'm having is getting another ul appended
Using JQuery have the section with id="first" suddenly appear in the browser window
I did this Source Code <section id="first"> <!-- use for Ajax --> <form method="get" action="" id="add1"> <fieldset> JS Code $(document).ready(function(){ $("first").show(); }); Don't understand why it's not working :s?
Shadow
Hi, is there a way to get a (transparent) shadow outside the Basic dialog window? Regards Thomas
Autocomplete arrays
I've been working with Autocomplete and have it working fine based on one of the demos. It links to an external JavaScript that includes an array. Is there a way to take out the JavaScript function and put it in with the HTML? The array would remain separate. I'm guessing the function would have to be modified to pull in the text of the array, but I'm not sure how to do that. The reason for doing it this way is that we would be able to use the same array with two different plug-ins. Sorry if this
jQuery 2.X problem with IE8 - is there any work arround ?
Is their anyway I can use jQuery 2.0 and still have support for IE8 ? I know jQuery 2.x does not support IE8 and below versions. I got following option to work with but I really want to use jQuery 2.X.X and still want to have my web site working find in IE8. <!--[if (!IE)|(gt IE 8)]><!--> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> <!--<![endif]--> <!--[if lte IE 8]> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
External links on Tabs?
I am a total newbie with jQuery, and I was modifying a script for a blog that has the jQueryUI for vertical Tabs in it. Which is all fine and well and it's working like a charm, but I really need to add a link to the Tabs that leads to another page entirely. Which I've found out isn't working with AJAX? But isn't there some way to get around this? (Blog with the tabs)
Easiest way to show div based on radio selection
I have a situation whereas i need to show a different div with a different set of options based on the users radio selection. At the moment this is what i have http://jsfiddle.net/e08jo9gr/11/ but only works with 1 div. How can i make this work for multiple radio buttons? or is there any easier way how to do this? help much appreciated.
$.ajax fails to run on the client’s Microsoft IE browser
The published website’s asynchronous call ($.ajax) fails to run on the client’s Microsoft IE browser. When the website is added to Internet Options > Security > Trusted Websites the asynchronous call succeeds and everything runs smoothly. I have repeated this, less than desirable, fix to two different machines’ browsers, and each time the fix works. The problem is having to repeat this awful fix on every client’s bowser. Is anyone aware of a better fix than this?
how to feth data from thirdparty server with ajax
$.ajax({ type : "POST", cache : false, url : "https://in.yahoo.com/?p=us", dataType : "jsonp", success: function(Result){ alert(Result); } }); i got following error Uncaught SyntaxError: Unexpected token < link http://jsfiddle.net/3908050/sqrh4doh/4/
access each other elements from different xhtml pages included in one single xhtml page
Hi everyone, I'm using seam and I'm using jQuery in order to edit some components of a xhtml page. In my xhtml page I have several xhtml includes: <ui:include src="test1.xhtml" ></ui:include> <ui:include src="test2.xhtml" ></ui:include> <ui:include src="test3.xhtml" ></ui:include> My question is: How can I access test2.xhtml elements from test3.xhtml elements? e.g: An event is triggered when I change the selected value of a combobox in test3.xhtml. In test2.xhtml I have some checkboxes selectBooleanCheckbox
Something like data-role="collapsible" but without icon?
Hi, i'm looking for something like this but WITHOUT the icon: <div data-role="collapsible" data-collapsed="false" data-theme="c"><h3>Test</h3>Bla...</div> Collapsing is not needed... i just want that combination of header and content. Many thanks!
Else if Jquery
<script type="text/javascript"> $(document).ready(function teste() { $("[id$=dialog-confirm]").dialog({ resizable: false, height: 250, width: 500, modal: true, autoOpen: false, buttons: { "Sim": function () { $("#content").hide(); $(this).dialog("close");
Wait for signal from server or mysql
Hi. Is it possible that with the help of Jquery wait for the change in the database, and then gives an overview in a div (for example <div class="result"></div>) but with no permanent refresh div's for every "n" seconds If this possible, can you show me an example or explain how to do it? PS: to be more precise I want to just after the entry of a new row in the database, in diva result, added a new value that contains this(new row values in the database), but without constant refresh of the same
Stop slide toggle when toggled
Hi i'm working on a site which requires a new form field to become available once the other radio button has been selected. I've got a slide toggle to work when this is selected but if i were to click the radio button again it performs the slideup action. Is there anyway to stop the slideup action happening if the toggled element is clicked again? i only want it to slide back up if the other radio buttons are selected. Heres my fiddle http://jsfiddle.net/e08jo9gr/6/ Help much appreciated.
Colorbox isnt working!
I´ve got a problem with the jQuery colorbox. Somehow the colorbox wont open but I dont know why: http://jsfiddle.net/Lgdez0dn/7/ Tanks for the help
Basic page template does not work
Hi, i would like to test the "Basic single page template" from here: http://demos.jquerymobile.com/1.4.5/pages/ I changed the [version] into 1.4.5: <!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="http://code.jquery.com/jquery-1.4.5.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div
Referencing local copies of JS and CSS files
I am building a form dynamically using PHP and the jQuery DatePicker widget. The form will have a variable number of date fields in it depending upon the number of records retrieved from a MySQL table. I can get this to work fine... until I start trying to change minDate and maxDate options for each DatePicker instance based upon values retrieved from the MySQL table. I decided to simplify the code to remove references to the MySQL table data until I can figure out how to get the loop to work for
Pegar valor da session
Preciso pegar o valor da session mas não estou conseguindo. $(document).ready(function teste() { if ('<%= Session["CheckBoxListProduto"] %>' == "Saúde") { $("[id$=dialog-confirm]").dialog({ resizable: false, height: 250, width: 500, modal: true, autoOpen: false, buttons: { "Sim": function () { $("#content").hide();
Estou usando Master Page ASpNet e não funciona com Jquery.
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" CodeBehind="WebForm1.aspx.cs" Inherits="Movimentacao_Web.WebForm1" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <script src="http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"
Show the second block of check boxes if first block of checkboxes completed.
i want to Show the second block of check boxes if first block of checkboxes completed. i.e; first block has 2 or 3 check box if all were selected then second block will be displayed and same technique will be used for third one. if any check box were unchecked from block 1 then next block 2 will automatically disappear and unchecked the select check box of block 2 Please help
Next Page