Encontrar un elemento dentro de otra pagina cargado con .load
Hola, no consigo seleccionar un elemento cargado de otra pagina. Os pongo mi codigo: index <div id="contenido"><!-- aqui ira la pagina cargada --></div> Mi funcion dice asi: $(document).ready(function () { $('#contenido').load('1.php'); if ($('#act').length){console.log('encontrado');}else{console.log('NO encontrado');} }); y la pagina 1.php: <p id="act">hola</p> En la consola siempre me sale "NO encontrado". Como podria hacer para seleccionar ese objeto? Saludos.
Function doesn't work with latest API
I have the following character counting code. It works fine if the line to load the API is jquery/1.4/jquery.min.js. If I change it to jquery/1.10.2/jquery.min.js, the div doesn't update. Would someone point out the problem, please? <div><input type="text" name="title" value="Replace me" id="pagetitle" onkeyup="javascript:return ShowCharacterCount('pagetitle')"> </div> <div><input type="text" disabled name="title_cnt" id="pagetitle_cnt" value="0"></div> <script type="text/javascript"
slide and collapse working together
I have a page with 4 rows and 2 cols, in each of this rows is a bootstrap accordion and an image which is in the other column. When the header is clicked the accordion opens(bootstrap collapse) and a hidden div with images is shown under the image already visible on the page (slide jquery). So with one click 2 divs open(accordion body+hidden div), this works for all 4 accordions when I use different ids for the accordions, but they stay open. I like to have them close if another header is clicked.
Removal of divs that do not contain other divs
Hi All, I'm am trying to target an empty set of divs & remove them (.stacks_out) & everything inside of them. Note there are others similar, but they have divs inside the comment lines. Typ. divs I want to remove: <div id="stacks_out" class="stacks_out"> <div id="stacks_in" class="stacks_in"> <!-- comment line --> <!-- another comment line --> </div> </div> $('.stacks_out').each(function() { if ($(this).children().not(":has('div[class^="searcher"]')")) { $(this).remove(); } });
keeping sub menu open on hover and close sub menu on mouse move down or scrolling
here is the code for menu. (document).ready(function(){ $("#main-nav li a.main-link").hover(function(){ $("#main-nav li a.main-link").removeClass("active"); $(this).addClass("active"); $("#sub-link-bar").animate({ height: "40px" }); $(".sub-links").hide(); $(this).siblings(".sub-links").fadeIn(); }); $("#main-nav").mouseleave(function(){ $("#main-nav li a.main-link").removeClass("active"); $(".sub-links").fadeOut(); $("#sub-link-bar").animate({ height: "10px" }); }); }); HTML code <div id="sub-link-bar">
how to add a new member to group?
Hi this is the fiddle this is not working for small screens so for display please use this link. In the users tab,there are 2 tables.left side are group members and right side are group members. For example,when you clickon del group name then their respective group members will be selected(check boxes will be selected). The member so of del group are 1st row,2nd row and last row.So when you click on the del group button(on the left side) then 1st row,2nd row and 3rd row checkboxes will be selected.Also
$("html").empty() fails in IE.
Hello, this will be my first newbie question on this forum, so go easy.... I was just experimenting with methods to erase all children of <html> and replace it with an entirely new DOM structure. I tried something as basic as this: $("html").empty().html("<head><title>Hi!</title></head><body><h1>Hello World!</h1></body>"); So, this code fails in IE6 and IE8, but it works in the latest version of Chrome. Does that mean this is a bug? What would be a better alternative solution that works for IE
Gary Seckendorf - Technical problem
I am unable to install jQuery on my system as every time it shows technical error. Can someone help me? Thanks Gary Seckendorf
getting data from webmethod
Hi; [WebMethod] public static string SendData() { string ssa="example" return ssa; } Html <input type="hidden" id="gin"/> hidden input value need to be return data from webmethod(value=ssa) how to do this with jquery/ajax please help me
.animation not working
<script type="text/javascript"> $(function(){ $('.menus').hover( function(){ $(this).animate({ "backgroundColor" : '#CCC'},500); }, function(){ $(this).animate({ "backgroundColor" : '#000'},500); } ); }); </script>
accordion actions
I have this code: <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.8.2.js"></script> <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script> <style> #accordion-resizer { padding: 10px; width: 350px; height: 500px; } </style> <script> $(function() { $("#accordion").accordion({ heightStyle: "fill" }); }); $(function() { $("#accordion-resizer").resizable({ minHeight: 140, minWidth: 200, resize: function()
Jquery UI tabs question in LifeRay 6.1
Good morning, I am trying to add a tabbed interface to a Web Content Area in LifeRay. However, I'm running into some frustrating problems and as a non-developer I'm not really well equipped to handle them. I'm hoping they are rather simple and someone can give me some quick pointers. Basically I have a page that is now loading into 3 separate content areas on the LifeRay page. I tried adding the source from many of the examples on the page, but they wouldn't load correctly and instead were rendered
Create JQuery toggle using hide and show methods
I tried to hide and show a html element using hide() and show() JQueary methods. I wrote a very simple JQueary script for that. Its working but has a problem. its only work corectlly in one loop. after 1st loop its not working what I expected. here is my code ------------------------ <html> <head> <script src="jquery-1.10.2.min.js"></script> <script> $(function(){ $("button").click(function(){ $("#image").hide("slow",function(){ $("button").click(function(){ $("#image").show("slow"); }) }); });
closest(class) needs to be a cookie's name
I'm dynamically assigning tables as data1, data2, data3, yadda yadda. Inside these tables, I need a function that grabs the closest table's class, so I can assign it as the cookie name. So in theory, I should be able to go inside data2, click on this function, get a data2 cookie, and ta dah. I'm hoping the solution to this problem will provide insight to how I can assign the cookie value, but right now, I'm just focusing on the name. How would I grab the closest table's class? I've tried $(this).closest("p").class.val()
How to add more than one div in a tabbed menu?
Hey guys, I'm building a website where I have a menu (let's say it's a box) that has two tabs, "Enter" and "About". Now I've seen a video tutorial on how to make the tabbed menu work with JQuery, but what If I Want to add more than one div to the content? For example: div id="tabs"> <ul> <li class="active" style="border-top-left-radius: 4px; border-right: 0px;">Enter</li> <li id="2" style="border-top-right-radius: 4px; border-left: 0px;">About</li> </ul> </div> <div id="caixa"> <div id="enter"> <p>1</p>
Style accordion widget
New to JQuery. I downloaded the accordion, put it on a web page on my site. Works fine. My problem is I'm trying to figure out how to style it. The only thing that seems to work from my css file is the width of #accordion. How do I style the group background and the header? Thank you, Jay
JQery Function Not Working
This function is not working please help me i need to auto complete the data in suggested text box $('#BrandName').autocomplete({ source: function (request, response) { $.getJSON("/DataCollection/SuggestBrandName?term=" + request.term, function (data) { response(data); }); }, minLength: 1, delay: 100 }); my json result public JsonResult SuggestProduct(string term) { var DataBase = new DataBaseEntities(); var allProduct = DataBase.Tbltables.Select(s => s.BrandName).ToList(); var getAutocomplete =
In console.log it printing url alone and also it doesnot showing image in my webpage
my JSON data "image":{ "path": "../image/Penguins.jpg", "width": 200, "height": 200 }, my script $(document).ready(function () { var tran = null; $.ajax({ type: "GET", url: "../data/data.json", dataType: "Json", success: function (msg) { var image1 = msg.image.path; console.log(image1); $("#abc").append(image1); }) } });
Calendar, Date Reminder ?
Hallo, I know this is not a theme for a jQuery beginner :-) But I am interested how can you make a date or calendar reminder notification with jQuery. I know there are several data picker plugins. Assuming that I have such a calendar on my page and a user selects a date. The date is stored in LocalStorage. For example the day 24.12.2013. How can you check the date permanently in the background and how can you make a notification when the moment has come? I can imagine to make an alert window on Windows.
Trigger button event on page load
I am trying to trigger a button on on the load of a page. It's a JQuery button with the html code in the page as: <a href="" class="btn1"></a> So far I've tried : <script> $(document).ready(function(){ $('.btn1').trigger('click'); }); </script> But that doesn't do the job. What should I use to make this work? Thanks a lot. John
Jquery Data table
Hi , I am new to jquery. I want to develop a grid with Formula's. If user right clicks on column, i need show a context menu like Edit formula for that column. I need to get the formula for that column show in text box(Separate screen). Once user changes formula, i need apply to that column. Ex: i have 3 columns like A,B,C. C column is a formula column like C=A+B, i want to give user a chance to change it to c=a-b. Please help me how can i approach for this feature. Thanks in Advance.
Find the right script
Hi, I've found a few scripts but each is about one elements away from what I need Any help tweaking them would be fantastic. 1) http://tpctestsite.weebly.com/ Is there a way to show the name in the right box in the order they were selected rather than alphabetically. 2) http://tpctestsite.weebly.com/5678.html same problem as number 1 3) http://tpctestsite.weebly.com/9000.html can't get to work on iOS or android 4) http://tpctestsite.weebly.com/1000.html would like to enforce a minimum/maximum requirement
Increment date and time by 1
Hello. I have a rather simple code that shows the time and date as one string. Example: if now the time and date is 07:30 on 17/12 then the output is 07301712. Im trying to find a way to increment each of the numbers by 1 per each number. Example: if my current output is 07301712 then i need jQuery to output 18412823. which means +1 to each number in the string. How can this be achieved? <span id="date"></span> var now = dateFormat(new Date(), "HHMMddmm"); $('#date').append(now); Thank you for your
Help with a selector
I need to select the "Select this" text from the< td> .Don't need the bold part. What is the correct selector. <td> <b >Status: </b> Select this </td> $'td').(':not("b")').text()) is not doing it. Please Advice.
each table rows
I have this situation var tableHtml=$('.tableClass').html(); Now I want through iterate through each of the tr inside the tbody. I tried $(tableHtml).find('tbody > tr').each(function()); Cant get it to work. What is the right way of doing this. Due to special requirements I have to put the tabke html into a variable. Please Advise.
Iam getting Handling JSON objects alone in web page,my script file is not working
My index file(index.html) <!DOCTYPE html> <html> <head> <title></title> <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="js/script.js"></script> </head> <body> <p>Handling JSON Objects</p> <span id="acc-list"></span> </body> </html> My Script file(script.js) $(document).ready(function () { alert("welcome"); var data_url = "data/data.json"; $.ajax({ type: "GET", url: data_url, dataType: "json",
Submit form with one image and show all results on same page without refresh with the help of Ajax,Jquery,php and mysql
please help me friends i want to Submit a form with one image and show all results on same page without refresh just like----- Name:........................... Email:.............................. Image:............................. Date:................................. skill:.................................button for Add more skill submit show result bellow after submit without page refresh....just like--- S.No.----,Image----,Name-------,DOB------------,Email------------------,Skills 1----------,@--------,Nadeem,----10-06-89-------,ha@gmail.com-----,
Buttons behavior between PC and Touch devices
Basically I am a web designer and I don't know much about jQuery so I'm a little bit lost. I wrote some jQuery scripts to manage buttons but they don't have the behavior as I would like on PC and on Touch devices. I have two families of buttons to manage. The "images" buttons (swap) and the CSS buttons (background color change). I would like to disable the "hover" effect on Touch devices because it's mismanaged but keep the mouse clicks on Touch devices AND PC. But the drama is there. Here is a model
Can't Set Height Style in Accordion.
Hello there. I'm totally new to this and have made it thus far on sheer luck. I have on my page a FAQ with a query accordion widget. I can't set the height style to content because I don't know where to put it in the code. Would someone please take a look at my code and tell me where I should put it? Thanks a million in advance. Thomas. </ul> <head> <meta charset="utf-8"> <title>jQuery UI Accordion - Sortable</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
"Unexpected call to method or property access " error
Hi, I am pretty new to Jquery. And I got this error with IE 11. I attached the code causing the error, but I didn't see anything wrong since I used like this before. And I tried Chrome which gave no error but no data. Basically, I am using script to get data though web service. And I believe the code on the backend is correct since I can get the data. Please help me out. Thanks <script type="text/javascript"> (function () { PageConfig = { GetPositionDetails: HS.BaseController.PositionUrl
hide and show button based on selection from the drop box
Hi, I have the select drop box with Add and Remove value. The default is all fields are showing up the page along with the submit button. What i need is when i select Remove from the requestType box, all fields are hidden and only Remove button shows on the page My code didn't do what i want. 1. When i first go the page, the Remove button is hidden which is correct. 2. As soon as I select Add from the requestType field, the Remove button appears which is not correct. 3. When I select
Get the value listview
hi! how to get the value listview?
jquery popup
Hi I'm trying to create a popup where it shows up when the page has loaded. Do you know of a good tutorial that can show me how to do this.
Complex jQuery image slider stop / start timed question
I need to get hold of a jQuery image scroller that scrolls through a large amount of images continuously but stops when one image gets into the middle of the scroller and then displays the thumbnail, but in a large version in a box directly above the box that the thumbnail stops in. So... How it will work... 1. Images are scrolling continuously. 2. 1 of the images get into the center box and displays a large image of the thumbnail in a box above. 3. After 3 seconds, the next image scrolls into the
Passing variable between functions
Hi Guys, I'm trying to scale some images that are imported into the page. I'm setting up a dummy test image to get the orig. width, but the width is coming up undefined. Strange since I'm reading in src for the image. I tried setting up a closure function & even using window.variable, but nothing works. You can see a demo here: http://www.partiproductions.com/searchertest2/index.html Can someone please help me with this code. function scaImage() { $(function() { var oiwd; $('div[class^="searcher_stack-its_img"]
jquery cycle plugin for Magento theme grayscale
Hi there, I am a newbie to all this javascript and web dev so I hope the following is phrase well and that I can get help here: I have a Magento grayscale template installed on my site: you can see a demo of this template here: http://web-experiment.info/magento14/grayscale/ I read in http://web-experiment.info/articles/cat/grayscale/post/how_to_install_magento_grayscale_theme/ and understood that I need the jQuery Cycle plugin to be installed on my system. So first batch of questions: how do I know
problems with autocomplete
Hi, I am trying to develop an autocomplete search box on my site. I am almost completely new into jQuery, so I'm having tough time, I'd appreciate if you could help me a little bit. I suppose I have several errors. I have based my js code on http://jqueryui.com/autocomplete/ : $.widget('custom.catcomplete', $.ui.autocomplete, { _renderMenu: function(ul, items) { var that = this, currentCategory = ''; items.sort(function (a,b){ return a.category > b.category;
Demo page for Listview Autodivider Linkbar has a defect
Hi... I probably shouldn't post it here but I don't know where else to report.... I believe the "view source" session for HTML in this page is wrong, it is different from the actual source of the page and completely unrelated to the demo. Listview Autodivider Linkbar http://view.jquerymobile.com/1.3.2/dist/demos/examples/listviews/autodividers-linkbar.html Please move this post to somewhere you know it belongs to Thanks Ryan
Loading external pages into overlay
I am testing Jquerytools, Loading external pages into overlay, from source: http://jquerytools.org/demos/overlay/external.html. In my script it not works, i dont understand why... Thanks for help. <!DOCTYPE html> <html> <head> <title>jQuery Tools standalone demo</title> <script src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script> <style> <style> #overlay { background-image:url(http://jquerytools.org/media/img/overlay/transparent.png); color:#efefef; height:450px; } div.contentWrap
Connecting the dots
Sorry, newbie here. I have created a page in jquery mobile and written the accompanying javascript. You can see it working here http://jsfiddle.net/xGxQa/ My problem is when I try to get them to work together they don't. Where am I supposed to put the javascript in the html file? I have tried using Dreamweaver and Notepad++. I put in the appropriate calls in the header but when I go to preview the page it doesn't work. There is no styling and the quiz doesn't work. Any help would be appreciated.
Next Page