• popup-alert-window does not pop up

    I want that after the button click a alert window pops up. But when i click on the button nothing happens. My Code: <link type="text/css" rel="stylesheet" href="tinymce/js/jquery-ui.css"/> <script type="text/javascript" src="tinymce/js/jquery-1.8.2.js"> </script> <script type="text/javascript" src="tinymce/js/jquery-ui.js"> </script> <script type="text/javascript"> $(function () { $("#btnSave").click(function () { $("#divpopup").dialog({ title: "abc", width: 430, height: 200, modal: true, buttons:
  • How to prevent iframe thieves?

    Hey, This is what i found on internet: <script>    if (self == top) {     var theBody = document.getElementsByTagName('body')[0]     theBody.style.display = "block"   } else {      top.location = 'http://google.com'    } </script> I would like to get if self url = mywebsite.com or mywebsite2.com   show iframe else block iframe  error message What is the best way to do that? Thanks!
  • check to see if function has been run?

    Hi Folks, I've built a script that checks to see if a form input has a value, and if not, write an error with the field's label name in it. If they go back and fill in the field, it removes the error. It works great, but there's one issue; every time the user focuses out of the field, it writes the error again. I need to make it so that it only writes the error once. Using .one doesn't seem to work. Here's the html: <label for="name">Name</label> <input id="name" type="text" required> <label for="email">Email</label>
  • Younus Shah - What's New in jQuery 3.0 and How to Use It

    Hi All, My name is Younus Shah, and working as Sr Director, Global Quality. Could you please tell me What's New in jQuery 3.0 and How to Use It. Thanks, Younus Shah
  • hasClass not working for some reason...

    Hi, I've been pulling my hair out trying to figure out what is wrong with my code here: // Add attributes to external links if($('a').hasClass('notexternal')) {   // do nothing } else {   $("a[href*='http://']:not([href*='"+location.hostname+"']), a[href*='https://']:not([href*='"+location.hostname+"'])").attr('title','External link').attr('rel', 'external'); } Basically, I'm trying to make any links without the class 'notexternal' and that has an external domain have: 1. A title attribute of 'External
  • Question about get The first class img src

    Hi everyone,  First post here, I have 2 html docs the first one has a div with class "Img-container" and The second html has a div with class "Img-copy", how can i do to get The first class img src and get it on The second class when: I click a next Button on The first html that links to The second OR when The second html loads? Thank's a lot!
  • Problem about setting up a function in Script

    Hello everybody. I came across this script: <script>  $( "<div/>", {   "class": "test",     text: "Click me!",     click: function() {     $(this).toggleClass( "test" );   }  })   .appendTo( "body" ); </script> Is the script above, setting up a function for the newly added "Click me!", in that it is supposed to disappear from the page it is on, when someone clicks on it? if not, what should be expected from this script; I "tried this code out"; and "Click me!" is unfunctional. Thank's a lot!
  • check an element if exists and add class to its previous element and to it with jquery

    I have a vertical menu code, and i want to add collapsable sub menus, here is structure of my Menu's HTML code:     <div class="menu"> <ul>  <li><a>1</a></li> <li><a>2</a></li> <li><a>3</a>   <ul>       <li><a>sub1</a></li>    </ul>  </li> </ul>       </div> so as you can see here, many of the li tags of .menu > ul are there but only some would have sub menus in them. i tried to create jquery which could add treeview class to the li tag which contains the sub menu's ul tags and treeview-sub to the
  • NEED HELP | event.currentTarget.closest() or something similar (.parent ?)

    Hello Guys, I'm totally new to this forum and I appreciate to have the ability to discuss on jQuery and to get answers to my questions. I don't know that much jQuery and I need to modify some code written by someone that knows a bit more about it. My code involves a bit of PHP, that calls jQuery plugin functions. My problem follows... Code on the client page : <div> <?php   foreach ($joueurs as $joueur) { echo '<form roler="form" id="form'.$joueur['id'].'">       <table class="table">       <tr>
  • Use jQuery to parse & display image from database –

    Hello All; Need some help with this one. The topic headline itself explains the scenario. I have some image files in DB for every shop/restro of my application; images stored as raw bytes. Now using a web API I am fetching them. Any shop may have several pics associated with it. The image files are being fetched in the format like the huge lengthy: /9j/4AAQSkZJRgABAQEASABIAAD/4ROwRXhpZgAATU0AKgAAAAgADgEOAAIAAAAgAAAAtgEPAAIAAAAgAAAA1gEQAAIAAAAgAAAA9gESAAMAAAABAAEAAAEaAAUAAAABAAABFgEbAAUAAAABAAABHgEoAAMAAAABAAIAAAExAAIAAAAgAAAABAAAC2gAAA
  • Version conflicts

    i an very new to all things HTML and I have been struggling for a few days to get a from to datepicker working. Finally succeeded and then decided I should upgrade to the latest version of jquery as I had started with  some sample code that use 1.8.  I was able to upgrade to 2.24 but moving to 3.0 or newer created a problem in the test I was creating. I have tried adding the migrate plugin and the problem persists. The offending code is: from = $(this).datepicker();  and I later use the from variable
  • Using var in text?

    Hi Folks, I'm trying to build a script that will easily check to see if a form input has a value, and if not, write an error with the field's label name in it. I know I'm on the right track, but I can't figure out how to use the label name in conjunction with other text. Here's the html: <label for="name">Name</label> <input id="name" type="text" required> <label for="email">Email</label> <input id="email" type="email" required> and the js: $('input[required]').focusout(function() {   var labelvalue
  • Cannot get Dialogs to work

    I am finializing a large project and I am to the UI part and the first thing is I after I get all my scripts rendering in order is click on the link for the dialog box to open and the $('.myDialog').dialog does not work any longer. I get any error that states that there is no object named dialog. Now when I am in dev mode in the scripts i can do a $('.myDialog).dialog and the function dialog is not in the list of items to choose from. What am i missing? I am currently using jquery 3.1.0.js Can someone
  • I need help with datePicker

    Hi everybody !  I'm new on this forum, sorry if i'm not at the good place to post this.. and sorry for my english im french :) So.. i need to developp à calendar with event associate on some day..  i make this with datePicker and look my calendar :  i create some event ( 3 in total ) and the color on days 1, 2 and 3 are day with event ! and when i click on a day with an event, i display event info in specific div. All is ok, that work, BUT when i click on a day with element, my div with color for
  • Collapsible set - different look

    Hello, Expand than collapse cause different look for the first, second, etc., and the last. Is it WAD? Thank you, LP
  • Initialising a button on the page_container gives rubbish markup.

    The markup below throws a div around the Yes button & give a terrible ui (shown at the bottom) when the button is initialised using:              var w = $("#confirmDeleteAccountDialog .deleteConfirmationButton");       if (w.data("mobileButton") === undefined) {             w.button();       }       w.button("enable"); How do I go about NOT having the div around the anchor created? (Line 21) I've omitted all the script stuff. Thanks for looking, N <html> <head></head>  <body>    <!-- Mobile page
  • give each element style from html5 data object

    Hi there, I have a problem right here, let me give you the HTML first: <div class="section_checkboxes group_checkboxes"> <div class="col_checkboxes span_1_of_2"> <img src="images/interactive-test/fibro-mann-front.png"> <ul class="man_checkboxes"> <li><label><input type="checkbox" data-top="-100" data-left="-59" name="front" value="1"> Kiefer links</label></li> <li><label><input type="checkbox" data-top="-100" data-left="-5" name="front" value="1"> Kiefer rechts</label></li> </ul> </div> </div> Now
  • name file

    Hi there, I need retrieve the name file witht extension  value = row.find('a').html(); value is : "<img src="http://localhost/Domus/uploadFile/server/php../../../../images/immobili/tmp_kernel/thumbnail/58.jpg">" I try with  String.prototype.filename = function (extension) {             var s = this.replace(/\\/g, '/');             s = s.substring(s.lastIndexOf('/') + 1);             return extension ? s.replace(/[?#].+$/, '') : s.split('.')[0];         }; nomeCopertina = value.filename();but nomeCopertina
  • Embed JQuery Mobile App to Site

    Good evening, I have a website and I have created a JQuery Mobile App of the website. What I would like is for the user to visit my website, then have the option to click on a image "Download app" and the mobile web app automatically downloads to a icon app. Is this possible. I have detect mobile browser JS embedded, but confused as to how that can help me. Kind regards
  • Jquery .fadein affects containers before

    I have a mysterious problem: <div class="ttbl0" id="msg0">Messages</div> $(data).hide().fadeIn(1000).insertAfter("#msg0"); data in this case are: <div class="kld0"> <div class="mbx24"> <div class="wlls-t"> <div class="row1">test1</div> <div class="row2">test2</div> <div class="row3">test3</div> </div> </div> </div> It works fine and inserts data after msg0 container with fadeIn effect. The problem is that after data finishes fading in, the container msg0 do the same - it disappears and appears again
  • Javascript Charecters

    In Javascript, what does a colon denote? for example: current = (current != slides.length - 1) ? current + 1 : 0;
  • Autocomlete Widget populate inputs after selection

    HI, PHP / MySQL / CodeIgniter I have a working Autocomplete Widget that grabs suggestions from a MySQL .db: Controller: public function getorganizers() { if (isset($_GET['term'])){ $q = strtolower($_GET['term']); $this->eldata->AutoCompleteOrgs($q); } } Model: $row_set = array(); $this->db->select('Organization, OrgNo, Postal_Code, Website_URL'); $this->db->like('Organization', $term, 'both'); $query = $this->db->get('event_organizers'); if($query->num_rows() > 0){ foreach
  • .load() breaks form submission

    I have a a <div> "popup if you will.  By using a table cell onClick event, I am currently executing the .load() method to change the <div> contents to a form that contains a <div> "button" using an onClick submit() method. The problem is that when I submit the form, my handler page id throwing an error stating that certain form variable are undefined.  In other words, the data isn't being passed for SOME of the form values.  However, some do get passed. When I load the raw form in the browser, it
  • Insert HTML5 video tag when clicking the button using jQuert

    I would like to make it like below. #1 The video file like .mp4 doesn't download when the page is loading. #2 The download start when clicking the button like "Start Movie" #3 Auto play using "<video></video> tag" in the page after downloading. *no downloading video file for users don't want to watch. *no page transition for usability. I'm confused how... Thanks for your help or advice.
  • Fire event on pag refresh

    Hello, I have this code:  <script> $(document).ready(function(){     $('#country_choice').on('change', function() {       if ( this.value == '138')       {         $("#town_dropdown").show();         $("#town_input").hide();       }       else       {         $("#town_input").show();         $("#town_dropdown").hide();       }     }); }); </script> It works very well when you select the dropdown menu with the id "country_choice" but my problem comes when I submit my form and there is an error, I
  • QUnit creating tests is not that simple.

    A couple of times I've tried to use QUnit for test support. But my experience is that I'm more busy debugging and trying to fix my QUnit test scripts, than developing functions. It goes well when using QUnit for testing plain JavaScript libraries, like function X returns something. But when DOM is involved, or ASync then it's getting fuzzier. My current problem, without going into details, is that my last test call, is executed as first. Partly because my code is depending on Asynchronous Callbacks.
  • Vertical tabs - Data table showing below - not next to as I need.

    Hi, I have a page that uses the jQuery tabs and each tab is a link to another tabs page (ie: <li><a href="<c:url value='/tabs/homeTab' />" title="Home">Home</a></li>).  My problem is the home tab (and all others is under the vertical tabs not next to it which I need. Any help is appreciated! Jerry Wolfson
  • Autocomplete textbox with multiple data from database in CodeIgniter using Jquery

       I want some help from anyone to do this Autocomplete textbox. Right now the data is coming from the database well but I want to restrict displaying the duplicate data. CODE:  $(function() { function split( val ) { return val.split( /,\s*/ ); } function extractLast( term ) { return split( term ).pop(); } function log( message ) { $( "<input name='skill'>" ).text( message ).prependTo( "#log" ); $( "#log" ).scrollTop( 0 ); } $( "#birds" ).bind( "keydown", function( event ) { if ( event.keyCode ===
  • Fetch year from Jquery DatePicker

    Dear All, Can any one help me in knowing how to fetch the year from Jquery selected Date Picker Thanks SAM
  • sql db to dialog window

    Hi guys! I am new. I have a table in jqueryUI dialog window. How can i getting data from sql database to table cells? I failed with ajax =\ When open-event of modal dialog_window i try to get one row from sql db where id = var from another_element (var is passed successfully here, I checked). $("#dialog_window").dialog({ open: function() { var id = $("#another_element").data('id'); $.ajax({ type: 'POST', url: 'response.php', data: id, success: function(data) { alert(data['F']); //try to show one
  • Help needed: how to keep drop down menu showing on hover and close only on click

    Hi everyone, I looked everywhere, couldn't find the solution. I have a navigation menu with dropdowns, I need the dropdown to be open on hover/mouseenter always, even the user change tabs or navigate inside dropdown menu.  And close only on 'X' close button. The sample code: $('.main-nav ul > li').mouseenter(function(e){         $(this).addClass('active').find('.dropdown-menu').show();      }).mouseleave(function(e){         $(this).removeClass('active').find('.dropdown-menu').hide();           
  • popup with scrollbars, can't select checkbox at bottom of popup

    Hi everyone I've got a popup that I need to constrain the size of. Within the popup there is a checkbox at the bottom, and whenever I try to click this checkbox, the dialog scroll jumps to the top position (and the checkbox remains unchecked). Thanks for any suggestions you can give Code follows <head>     <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.11.1.min.js"></script>     <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
  • SlickSlider: Connected sliders' last slide dropping down

    Am using the popular jQuery slider: Slick I'm having an issue that I assume is a bug. I have two connected slick sliders, but even though they have the same number of slides, the last slide on one of the sliders seems to just drop down and not show where it should. Any ideas please? jsfiddle: https://jsfiddle.net/beech/kygsq6f2/3/ Steps to reproduce the problem Go through the slider till the end. More Details Which browsers/versions does it happen on? -> Chrome Which jQuery/Slick version are you
  • how can I downlaod the jquery documenation

    I do a lot of remote off line work ... Is there an easy way to download the doco? There was a similar question but it is 5 years old and the links are broken in it.
  • cannot see why form validation not doing anything

    I added a validation to the email field on this page http://v26.ancestry.higgsy.co.uk/contact/contact.php.  To test it, I just submitted the form with all empty fields but you are taken straight my 'thankyou' page, no validation error appears.  Code is from Missing Manuals book 'Javascript'.  Can anyone help? many thanks
  • jQuery very small basic version available?

    Hi. Is there a very small basic version of jQuery availiable? I mean a very slim version that is only suitable for basic DOM manipulation. Without all the nice-to-have stuff like ajax, UI functions, css effects and so forth. And without explicit support for browser older than around 3 years. The file size should not exceed 20-30 kb.
  • Do some when DIV content changes

    Trying to do something when the content of a DIV changes and the new content is an "O" but it does not seem to work for me. My code looks like below. Any Ideas on how I can solve this problem. jQuery('.select2-chosen').bind('DOMSubtreeModified',function(event) {     var newText = $(this).text();     alert(newText);      if ($('.select2-chosen:contains("O")').length === 1) {          alert(newText); }                }); It is the minum height inches field on this page
  • Simple slideToggle question

    My simple JQuery $(document).ready(function(){       $("#one).hover(function(){             $("#two").slideToggle("slow");       }); });my css #two{       display:none; }my html <span id="one">one</span> <span id="twp">two</span>My question: In IE and Chrome, the only two browsers I'm concerned about, when I hover my mouse over #one, I would like for #two to appear to the right.  Which it does, however, there's an adjustment to my content containing <div> (not mentioned in my code above) and then
  • selector problem?

    I don't see the problem with this selector: var selectedid = $("[id^=cccproj][data-selected=='1']").prop("id"); // check id starting with cccproj that has data-selected value of 1 Does it look good to you?
  • Get Positions Of Elements Which have No Styles Assigned

    I was able to get the XY coordinates of all the child elements of a div and they all have the same top and left values. Why are the top properties (Y values) of all the child elements the same, shouldn't they be different since each element starts on a new line? Please click here click any where in the gray box. You will see that the top left coordinates for all child elements of main are all the same.
  • Next Page

  • Announcements

  • The Basics of jQuery AJAX

    A step-by-step tutorial for those new to jQuery and wanting to use AJAX in their projects. Includes valuable information about troubleshooting using the console and understanding the request / response. http://jayblanchard.net/basics_of_jquery_ajax.html
  • jQuery Conference 2010: Boston Announcement

      The jQuery Project is very excited to announce the jQuery Conference 2010: Boston on October 16-17, 2010.  The conference will be held at the Hilton Boston Logan in Boston, Massachusetts.  The best part of this announcement is that Tickets are on sale now!  This venue is the largest that the project has worked with to date (Harvard Law School in ‘07, the MIT Stata Center in ‘08 and Microsoft New England Research Center in ‘09) and we expect to sell out very quickly. A brief synopsis of some of