Accordion concatenate
Hi i used this script http://jqueryui.com/accordion/ But i have concatenate accordion, it's error <div id="accordion"> <h3>ONE</h3> <div> <p> TEXT < /p> </div> <h3>TWO</h3> <div> <div id="accordion"> <h3>TWO bis</h3> <div> <p> TEST </p></div> <h3>THREE bis</h3> <div> <p> TEST </p></div> </div> </div>
Light box : tries to open PDF same like image
Dear All <script src="<?php echo PATH;?>javascript/jquery.lightbox.js"></script> <script> // Initiate Lightbox $(function() { $('.gallery a').lightbox(); }); </script> works fine for me refer http://www.himashreetours.com/Tour/2/1/ANDAMAN-TOUR-6-NIGHTS-7-DAYS- click on scrolling iamge displays the image in lightbox However when i click on PDf for download purpose when I click on it..... the program tries to show/open this as an image on screen and obviously fails how can I open this PDF
jquery append - live checking email
I'm trying to check mail live. This is what I've tried: (full code at http://jsfiddle.net/badvz/263wj66d/ ) $('#container').append(row(jml));//function append form $(".no1" + jml).keyup(function () { //var msg = $("#msgbox"+jml).val(); var no1 = $(this).parents("#records").find("#no1").val(); //var cno = $(".no1"+jml).val(); //alert(no1); if (no1 < 3) { //$(this).parents("#records").find(".check_no").html(""); $("#msgbox").html("kosong"); } else { $.ajax({ type: "POST", url: "check_ajax.php", data:
How to create generic jquery function for each input
I have the following html code that works as is: (I've tried the two answers given below but neither of them work any other suggestions would be appreciated) <html>
<head>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.7.1.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.js"></script>
<script src="http://bililite.nfshost.com/inc/jquery.timepickr.js">
Drop down with validation wont work in array of data
I have drop down select field where I can select whether the item is brand new or repo, If I select the repo my hidden account no field (textbox) will show (temporary hide), if I revert back to brand new it will hide again the account no field, the condition is when I select the repo the account no field (textbox) will show but there's a validation that the text-field should not be empty when user submit the form and account no is blank. What I have done so far.. is good for 1 row only, meaning
Detect load type in jQuery: ajax vs regular http
Is there a way of knowing if a jQuery mobile page has been loaded directly (regular http call) or though ajax in order to load Adsense? Basically, Google Adsense cannot be loaded in pages that are loaded via ajax because it throws the error message: Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened. So the solution is to only display the Google Adsense banner if it is a regular http request.
Saving cookie for menue item
I have this code that collapses and expands the menu items. First I installed the jQuery cookie plugin. Now I need to save the value in a cookie of the top level category that is clicked. (function($) { $(document).ready(function() { $(".wpsc_top_level_categories > li:has(li)").prepend("<span class=\"CatExpander\">+</span>"); $(".wpsc_top_level_categories").css( 'cursor', 'pointer' ); $(".CatExpander").toggle(function() {
Textext plugin ; want to hide prompt text when textarea contains tags and not in focus
Hi, I am using the TextExt plugin to provide tag input and auto complete functionality for a text area. The plugin comes with a prompt message for the textbox, by default this prompt message will show when the textarea is not in focus and doesn't contain any text. However, if it is not in focus and contains tags but no text, the prompt message still shows. I need the prompt message not to show in this scenario. Here is an example ; http://textextjs.com/ : see the demo textarea still contains the
Slider not working?
Hello i am using jquery with asp.net website but , in new website( i mean to say on creating new website) it is running but in the website which already exist it doesn't work? Please guide me asap.
copy value of textbox in html table column to all other textboxes in same column on button click
Hi, below is my jquery function , can any one help me in iterating through table rows and copying the textbox value in first row to all other rows.. below is my jquery code var _this = jQuery(this); var defaults = { method: "AVERAGE", factorOrDuplicate: "DUPLICATE" buttonSelector: ".ApplyFactorButton", textSelector: ".FactorTextBox", averageContainer: ".ExchangeDataItemAverageContainer", attachClick: true, decimalPlaces: 0 }; var options = jQuery.extend(defaults, options); var _thisIter = jQuery(this);
How do I convert this inline javascript to a function
I have several email addresses on each page of a site. I have an inline javascript function to obfuscate the address and prevent bot harvesting, how would I convert the inline to a single function? here's the inline <script type="text/javascript"> document.write("<n uers='znvygb:fhccbeg@urkare.pb.hx'>fhccbeg@urkare.pb.hx</n>".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<='Z'?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);})); </script> the 'fhccbeg@urkare.pb.hx' part in this example is
Persitent Navbar not working after page Transition.
Hi , I am facing one problem in jquery mobile code , please help me. My problem in persistent navbar. I have two page , In first page don't have navbar. But second page navbar is present and I am redirect from first page to second page . But unfortunately navbar not working in second page. If I run individually second page persistent navbar working fine. I paste my code here: Page :: 1 First.html <!DOCTYPE html> <html> <head> <title>jQM Complex Demo</title> <meta http-equiv='Content-Type'
How can I set different code base on @media
I'm a novice with jquery. I wanted to have the main background image on my site fade in when users first come to the site. I was able to accomplish that with some code I found. $(document).ready(function() { $('#back').animate({opacity: 0}, 0).css({'background-image': 'url(http://bobpower.net/wp-content/uploads/2014/12/group-celebrate.jpg)'}).animate({opacity: 1}, 3500); }); I had it setup before hand to change the background image based on different screen sizes using @media and css but
jQuery plugins with table and pagination
I'm using jQuery 2.x, I wonder if there's a plugin that involve less javascript code as possible when building a table filled with ajax call. Datatables.net has a good way to achieve this, but I suspect that works only with jQuery 1.x because I can't call the server side code with ajax. Any suggestion? Thank you
Closing widget issue
Hi there, I am new to widget development and I am trying developing a dialog widget. How can I unload/close/kill/destroy the dialog from a command button which is part of the dialog ?
shorten jquery code
Hi, I am trying to change this massive code to have just 1 popup ONLY of 'availability doesnt match do you want to continue' ok or cancel as the options. The code is part of a html code which just calls this code as part of a cakephp program. I cant remove the extra dialogs after this notification. Also the notification if the availability does match I want it to continue. I really want to shorten this code to a few lines only but i cant . How do I get 1 option only of this because when I did myself
infinite scrolling only div part and not hole page
hi! i want to load specified div for my infinite scrolling, not hole page. i know i have to use valid jquery selector at load, but i make it wrong always in my testings. i used below code for page scrolling, but how i make it to only div loading scrolling and not hole pages? jQuery(document).ready(function() { //location.href = 'index.html#start'; var pages = new Array(); var current = 0; var loaded = new Array(); $('#pages a').each(function(index) { pages[index] = $(this).attr('href');
Random infinite scroll and doesnt repeat already published divs
Hi, I have infinite scroll with JQuery. But repeats already published divs when scrolling down. I want that randomly (from about 7 different div content pages with each page having an x number of div content, those div contents are news articles), a random number of artcles are taken from each page and published on my home page. And that this process repeats itself till all artcles, over all 7 pages, have been published. So, no repeats happen on my home page. I am breaking my head over this one.
[Keith Wood Datepicker] multiple date range selection
Hi I am developing a WebApplication, in that i am having a requirement to select date range as well as a single date. Please find the below code which i have used to show the datepicker and i am using keith-wood JQuery DatePicker Plugin. $('#txtMonthlyView').datepick({ multiSelect: 31, monthsToShow: 1, monthsToStep: 1, prevText: '', todayText: '', nextText: '', minDate: '01/12/2014', maxDate: '31/12/2014', defaultDate: '01/12/2014', dateClass: 'showDoY',
Why there isn't an oldTab/oldPanel in Tabs Load() event?
Hi, as in the title, i don't understand why in the implementation of the Load() Tabs there isn't a oldTab/oldPanel object that reference the last loaded (or showed) panel (like in the activate() event). Someone can explain me that? thanks
problem with if istruction.
Hello everybody, I need help how to set if instruction in case where the final part of a condition is equal. I mean I have many strings like AD01, AD02, AD03, AD04 and then C100, C101, C102 and so on, I tryed to set in this way: if (mat == "AD*" || mat == "C*") some thing ... but not working How can I set my condition instead to set many times if (mat == "AD01" || mat == "AD02" || mat == "AD03" || mat == "AD04")? Thanks in advance. Tegatti
How to slide/reveal content properly
> Test Page On the above test page, I would like to add some slide effects to the boxes that are revealed on click. I'm not much experienced with jQuery, but I figure I need to do some kind of testing to know if the user is clicking on a non "active" tab link - if so, close the active box and open the details box of the link just clicked. If clicking on the already active box don't do anything. I'm currently using this code near the bottom of the HTML page: $( ".nav-tabs li" ).click(function() {
Another JQuery UI Issue
Hello I am trying to use a JQuery UI dialog box on my website http://www.jameswinfield.co.uk/Emma.html which would appear when clicking the Events button. It does actually now bring up the dialog bit - but I want to shade out the rest of the screen and just show the dialog in front - how can I do that? Apologies for the dumb question - this is the first time I am testing out JQuery and keep getting stuck, Thanks James
set hashtag and it word color before submit.
hello. sorry my english language isn't good. i used hashtag system in my website. but i want now before submiting post by user, hashtag and it word will get blue color. in fact like twitter. like this picture. thank you. if is require to my code, i will put to next post.
identify the child
Hello, sorry first, my english isn't the best and the problem to describe is not easy. I hope i can do. I have some tabels and every tablke has its own id. i have some rows in this table. In every row i have two radio-buttons. Now I need a function to find the line in the clicked radio. Sample: (is only a sample to describe what i need) an which CHILD is the radio-button clicked The reason why i need that is this i manipiulate the <input> fields at the row. with this $("#box-"+TypeId+" tbody tr:nth-child("+child+")
css or jquery and how?
Hi I want a menu like the site hookerfurniture.com Please help I do not know where to put
Fade In not working.
Hi, Why on the face of the earth this does nothing when pressing the button ? <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script> $("#btFadeIn").click(function () { $('PictureHolder').fadeIn('slow'); }); </script> </head> <body> <div id="PictureHolder" style="background-color:red;width:300px;height:200px;"
Referencing jquery to html in many sources
1. <script src="jquery.js"></script> (downloaded jquery uncompressed file) 2. <script src="http://code.jquery.com/jquery-2.1.3.min.js" ></script> 3. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js"></script> Is there any differences between these three? Which one should i use?
Binding touchstart to body causes iOS hover delays to disappear
I work heavily on the Drupal platform and several jQuery modules, but recently the Drupal Google Analytics module came out with an update that binds touchstart to the body in order to track clicks and taps for usage statistics. The only problem with this is that on iOS (most recent 8.x in my case) it kills the delay on hover CSS selectors. I've created a very simple demo of this behavior here: http://codepen.io/johnny5th/full/KwamjJ/ and my Drupal issue is here: https://www.drupal.org/node/2404215
how to get key value from list Items in html format in jquery to show respective detail page?
Am newbie to jquery.. I have tried to get json array in html format using ajax call in jquery.. then I have tried to show the respective detail page when click on item in item list.. how to get key value from jquery?? .. I have tried to search in net .. but didnt get clear idea.. Below mentioned code: <!DOCTYPE html> <html> <head> <script src="jquery-2.0.2.min.js" type="text/javascript"></script> </head> <body> <button id="action-button">Click me to load info!</button> <table id="info"></table>
using stringify
I am trying to pass two arrays to a php page like this: var mainFilter = getAllMainCheckedCheckboxesVals(); var subFilter = getAllSubCheckedCheckboxesVals(); JSON.stringify(mainFilter); JSON.stringify(subFilter); $.ajax({ url: 'process.php', data: { mainFilter : mainFilter, subFilter : subFilter}, type: 'post',
Colorbox-pop up automatically and after 5 minutes
Hi I am using colorbox and I want to display pop up automatically but after 5 seconds delay. How can I do this. Thanks Regards, Nazia
php Form, Validation & Preview in same page
Hi , I already build a form as php_self , i want to make it validation and preview on same page ; 1 file only . The source code : <?php // validate data $fnameErr = $lnameErr = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["fname"])) { $fnameErr = "First name is required"; } elseif (preg_match("/^[A-Z][a-zA-Z -]+$/", $_POST["fname"]) === 0) { $fnameErr = "First name must contain letters and spaces only"; } else { $fname = $_POST["fname"]; } if (empty($_POST["lname"]))
sum not working
Hi there.. Could someone tell me why this code give me as result of totViewNav 1935 instead of 54 (the sum)? I premise that I'm putting this on a wordpress theme.. thx in advance! jQuery( window ).load(function(){ var halfWindowHeight = jQuery( window ).height()/2; var halfViewportHeight = jQuery('.flex-active-slide').height()/2; var viewportNavHeight = jQuery('.flex-control-nav').height(); var paddingViewNav = jQuery('.flex-control-nav').css('padding-top').replace('px', ''); var totViewNav = viewportNavHeight
hide images and release the space.
I have a lightbox gallery. Everything is fine but I wanted to make it filterable. I used a tutorial and ended up with this code: HTML: <ul id="filter"> <li class="current"><a href="#">All</a></li> <li><a href="#">Kitchens</a></li> <li><a href="#">Bathrooms</a></li> <li><a href="#">CAD</a></li> </ul> <script> jQuery(function () { jQuery.thumbGrid.transitions.slideLeft = {in: {x:"0%", opacity:0}, out: {x:"-100%", opacity:0}}; jQuery.thumbGrid.transitions.slideRight = {in: {x:"0%",
using variable
I have the following code: var weight = ""; weight = $("#selectWeight").val(); if(weight == '') { alert('you must select a value first!'); } If weight has no value, I do not get a alert box. If I add an alert after getting the weight value, then I get the alert box. Is there something about using/initializing variables that I'm missing?
on() "mousedown" isn't working anymore. What am I doing wrong?
Hi On my site I want to change the href on all itunes links into a shorturl. I use this code. I think it worked before, but now it seems it has stopped working. Not sure why. No errors in log. Maby there's a more elegant solution (that's working)? jQuery(document).ready(function() { jQuery("body").on('mousedown', 'a[href*="itunes.apple.com"]', function() { var l = jQuery(this).attr('href'); if (l.match(/id(d{3,25})/g)) { jQuery(this).attr('href','http://tinyituneslink.co.uk/'+RegExp.$1);
Hover a div and change the class of the child div.
Hi All, I'm trying to create a sliding div inside a product on a product category page. But I can't figure out how to target just the div inside the div I'm hovering. Here is my js code ("jQuery" is needed instead of "?" in Wordpress ) ... <script> jQuery( ".woocommerce ul.products li.product, .woocommerce-page ul.products li.product" ).hover(function() { jQuery( ".product-info-slide" ).toggleClass( "showMe", "hideMe" ); }); </script> It toggles all the the .product-info-slide divs. I just want the
Tooltip - growing number of DOM elements
Why it adds new DOM element every time tooltip is shown?
Hover img with id=?
<div id="something"> <img class="button" id="article-222" src="image.jpg"> <img class="button" id="article-212" src="image.jpg"> <img class="button" id="article-292" src="image.jpg"> </div> How to catch particular hovered image and to do something with it?
Next Page