Popup to Display Error Messages
Hi, I would like to have a popup to display error messages in my app. I would like to write a simple function like: function error(msg){ ... } to configure and show the popup. However it seems like the popup div that to contain the error message has to be placed on each page of the app to make this work. If I just make one popup error div, it is only specific to the page it was placed on. Is there any way I can create a simple function like this without created a popup error div for each page
Example of a jQuery Designer?
Hi, I'm looking around for an example of a jQuery app where your can design a room, art, or a t-shirt. I found one where you design a t-shirt and change its color but nothing sophisticated like scaling, rotating etc... thanks.
Modifying this snippet for use in wordpress
I have this snippet of code success: function(data){ //create jquery object from the response html var $response=$(data); //query the jq object for the values var oneval = $response.filter('#one').text(); var subval = $response.filter('#sub').text(); } and i want to prepare it for use in the wordpress backend.How can i replace the $ with jQuery?.
how to retrieve data from database based on postition in phonegap?
I'm displaying the alphabets in a grid view,whenever i click on each alphabet it has to display the corresponding words of that alphabet,for that i could able to get the position of each alphabet,so how can i retrieve or pass the data from database? here is the screenshot of that var a2zArray =['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']; $(document).ready(function() { createA2ZGrid(); }); function createA2ZGrid(){ var rowElem=''; for
button 'refresh' and hover
below is html <div data-role="content"> <div style="width:250px"> <input type="button" data-theme="e" value="data-theme='e'" id="testButton1"/> </div> <div style="width:250px"> <input type="button" data-theme="b" value="data-theme='b'" id="testButton2"/> </div> </div> changing the button theme as below $("#testButton1").buttonMarkup({ theme: "b" }).button("refresh") (This code can be directly tried from chrome/ff console) it changes the theme.. but when I hover the button it returns to old theme.
click the image, the image to the full use of the screen size and describe the story using jquery mobile
Hi, I have some images that is related to my project. For Eg : I have four images, that these four images having some text also. When i click the image, the image to the full use of the screen size to show the photos with a small 'i' icon which then will show a small pop up that describe the story. Please any one give sample.
Weird behaviour on show/hide layers all of a sudden
A site I built a while ago has recently started behaving weirdly. I used show/hide layers to make several rollover maps, and now the rollover layers all seem to be sliding up and down and all over the place. Before they were just showing normally, in place, on mouseover. See this page for example: http://www.thehaymarketedinburgh.com/the-haymarket/site-plan/ Rollover the buildings and the highlight appears to slideup from the bottom of the browser, where before, and for months, it didn't. If you
Content no longer selectable after using persistence header (on iOS)
Hi everyone, When making a persistence header, using data-id="name-it" and data-position="fixed" on my multiple page, the content is no longer selectable (on iPad/iPhone). When I remove the data-position and data-id it works fine. Also, (using persistence) when I tap once in the content area on an iPad, the header/footer/li text goes bold, until tapping it again. www.michaelmaasdam.nl/mobile/test/ Does anyone know what I'm doing wrong? I'm new to jQuery so I would really appreciate your help!
What should be the proper value for "this" in a UI widget callback?
I have a widget that someone else wrote. They decided to use an option instead of an event. something like { onSuccess: function() { .... } ); As I am using this widget - I see that when I implement the "onSuccess", the value for "this" is the plugin instead of its element. for example : (onSuccess: function(){ console.log(this); });this will print a.widget.a.(anonymous function).(anonymous function) I think the value for "this" should always be the element, and not the widget. Am I wrong?Is
jquery mobile doesnt prevent scroll in windows mobile
As in JQM even a single click is Ajax call...in my application when user click on any link a process indicator appears on screen...when processing indicator appears then user should not scroll the screen and background area should not be clickable i.e it should prevent from click. i have written code: disabelScroll() { $(document).on(scroll,function(event){ event.preventDefault(); event.stopPropagation(); event.stopImmediatePropagation(); }); $(document).on(scrollstart,function(event){
scope inside module pattern
I want to organize my code better, so I started on a module pattern. But I'm stuck already at the beginning This is my code (just for purpose of my question I stripped a lot). I want to use the private var array 'product' to push a productId. However in the 'public access methods' part, that var is 'undefined'. So i can not push a value into the array. Does anyone know why or have a solution to this? I would be very happy with it. PRODUCTS_MODULE = {}; PRODUCTS_MODULE.create
syntax error missing closing }
I get this error message: SyntaxError: missing } after property list right before the ↵$('#taskform'). I checked all opening and closing () & {} in a syntax checker so i can't figure out where the missing } is? ------code-------- $(document).ready(function() { $.ajax({ url: 'ajax/get_todosx3.php', dataType : 'json', success: function(data) { alert(success); var list_start ='<li "class" = "todo-list" >'; var list_end ='</li>';
Button's click event fires, but can't trigger ajax call
In a page of my asp.net mvc website, I load data into a jqGrid when the page loads, works perfectly without any problem. Now I added a button for users to search employees by last name. The click event fires, because I can see my alert("Last name is " + lastName) popup. But the ajax call is ignored. <input type="text" id="keyword" /> <input type="button" id="search" value="Search" /> $(document).ready(function () { $("#search").click(function () { var keyword = $.trim($("#keyword").val());
filtering images with checkbox
Hello, I'm looking for the next and can't solve it. I have N pictures, car red fast car blue car blue fast car green slow bike blue bike green ... <?php echo "<html>"; echo "<head>"; echo '<script src="jquery-1.7.2.min.js" type="text/javascript"></script>'; // JavaScript echo " <script language='JavaScript'> function run() { }; </script>\n "; echo "</head>"; echo "<body>"; echo '<div id="cuerpo">';
what is wrong with this
Not able to replace this text with a word highlighted: $('p *',$('iframe').contents()).each(function(){ $('*',this).contents().add($(this).contents()).filter(function(){ return this.nodeType==3; }).each(function(){ var html=this.text(); html.replace(/subject/g,'<span style=backgroundcolor:yellow>subject<\span/>'); $(this).replaceWith(html); }) });
How i display the status of a upload in a element
Hello, Well, i'm brazilian i don't speak English very good. Example, when i upload de image or others files appears: Sending...(STATUS) I want display this Status in a element, you can help me?
Using Jquery/prototype + innerHTML replacement.
I currently have a problem where I have used Jquery and Prototype on the same page with noconflict. Everything works fine up until I call Javascript functions on individual pages(in wordpress) to replace a div label. The conflicting code is: $('#variation_select_327_10 :not(:has(*))').text(function(i, v) { return v.replace(/--Please Select--/g, 'Quantity'); }); where the div for replace is #variation_select_327_10 I have tried using jQuery.noConflict(); var $j = jQuery; and then replacing
Validating value to check if its a valid time - can i use dateISO
Hey new to this but already in love with jquerry, its made my job so much easier can't beleive the time I wasted using other methods. Anyway still new to this so unsure if I can use dataISO to validate time value in terns of hh-mm-ss. Wc3 states ISODate include time, but just worried it only incuded if there also data in the values. If I can't use dateISO is there an otherway of doing it? Many Thanks Damien
before ajax doesn't work?
In these following codes $('#loading').('display', 'block'); doesn't work. What should I do? $('#loading').('display', 'block'); jQuery.support.cors = true; $.ajax({ type: "POST", url: "proxy.php", dataType: "xml", data: { source: "lastfm", wanted: keyword}, success: parseXml, error: function(xhr, ajaxOptions, thrownError){ alert(xhr.status); alert(thrownError); } }); $.ajax({ type: "POST", url: "proxy.php", dataType: "xml", data: { source: "lastfm",
Multiple $(function () { on one page
I have been searching and searching for this, but I have yet to find anything. I have a jquery function that is loaded in the header of my home page. That header is loaded for every page on my site, and when I visit a page with another $(function () { on it, that pages script doesn't work. Here is my home page code: <script type="text/javascript"> $(function () { $("#basic-combo").sexyCombo(); $("#basic-combo1").sexyCombo(); }); </script> Below is an example of the second $(function(){
Set value for select lists?
I have a script for setting checkboxes checked or unchecked with $('.checkall_pub').click(function () { $(this).parents('fieldset:eq(0)').find(':checkbox[name=pub_list\\[\\]]').attr('checked', this.checked); }); Now I want to have the same for a bunch of select lists... How do I set all select lists to the value 0?? Thanx in advance!
JQuery Mobile - how to set up a loading page before website loads
I have a FirstPage.html on my website. While the website loads (FirstPage.html loads), i want to display a WelcomePage.html for at least 5 seconds (even if the FirstPage.html finished loading). Can anybody please help!
Radio Button & ajax_load
Hi i try to send a value from an radio button. But the script doesent work because the value was not send. Any idea to solve this problem? $(function () { $('#id_radio').click(function () { var checkedradio = $('[name="id_radio"]:radio:checked').val(); $("#div_container").html(ajax_load).load("my_url"); }); });
Identifying dataType returned when using jQuery
Hi, Is it possible to identify what dataType is being returned by a page when using jQuery? Problem is, one page is a form which submits to user_verify.php. If the form does not contain errors the user_verify.php returns HTML and later redirects. If it finds errors, it returns json data (an array) which is sent to errorDivs. user_verify.php only does processing and does not contain any content headers etc. Any idea how something like this can be done? Thanks, Norman $("#sform").submit(function()
Controlling image position using scroll bar of browser
I want to guide an image through a path. The scroll down of browser should bring the image down the path, and the scroll up of browser should make the image to trace back its path. how can i achieve this using jQuery? Please help!! Thanks in advance! [duplicate of Controlling image position using scroll bar of browser - jQuery Forum ]
"submit()" event, "serialize()" and submit buttons. Get the button name
Hi everyone, On the server side, I'm using a web framework that use submit button "name" attribute to decide which action to perform. On the client side, I have an script that submit forms in Ajax with the "serialize()" functions. But as the JQuery documentation said, the serialize() function don't send the submit buttons names. I have tried to get the event.target object but this object is the form itself. So, I wonder to know if he is a way to discover obtains the name of the button that has triggered
problem in a jquery file.js
hi i have a slideshow, i download it from internet but it has a problem it's true in the main site but when i use it, one of the jquery.js files has problem, it redirect the page to the google site!!! i try to test it's files step by step and i understood this jquery file cuases this redirection! i check the jquery file and i understood that it uses a username and password, you can see that by search "user" in the .js file text , when i delete the if condition(about username and password) it don't
jqm trigger('create') issue
I have a situation where I am generating a list from an AJAX call then switching to the page. When I do this, I get the following error: TypeError: parentPage[0] is undefined (line 5189 of jquery-mobile.1.1.1.js) [Break On This Error] parentId = parentUrl || parentPage[ 0 ][ $.expando ], This is the code that does the ajax call and loads the DIV: function handleGetReports(data) { $('#recentReportsText').html(data).trigger('create'); $.mobile.changePage("#recentReportsPage", { changeHash:true});
How could I do this... ?
Hello, I have the next code in jquery: $(".tab_content").hide(); $("ul.tabs li:first-child").addClass("active").show(); $(".block").find(".tab_content:first").show(); $("ul.tabs li").click(function() { $(this).parent().find('li').removeClass("active"); $(this).addClass("active"); $(this).parents('.block').find(".tab_content").hide(); var activeTab = $(this).find("a").attr("href"); $(activeTab).show();
How to transfer/post byte array using AJAX
Hi there, i hope anybody can help me to find the correct way. I call a function from js in a activex class which return a byte array. Question one: Is follow code the correct way to store an byte array in js? var byteArray = []; byteArray = activexfunction() Ok should it be correct than i have to post this byteArray over AJAX to a WCF service. Question two: What's the correct content-type in ajax settings? Application/binary? BIG BIG THANKS FOR ANY ADVICES !!!!!
Problem with return $.post
Hello: I'm having a problem with return data from a $.post. Details follow below: The $.post successfully sends data to a .php file. The php file successfully processes the data and compiles results into an array. The array is returning in the console.log. When I return one value of the array (instead of the whole array), the value shows up in the console.log. However, I can't get pull the values in the array into jQuery for use on my main page. In addition, I know something is off in my $.post routine
Aptana code completion with jquery1.8
Is there a way to get jquery code completion in Aptana 3 with v1.8? I only found instructions for older versions that wouldn't work with 1.8.
Problem with arabic language
Hello everybody, i create native app with jquery mobile and android webview , When I get a text copy of the page When pasting in message Each word is written twice. please help me
Could I get a code review for my query dialog/lightbox code please?
Fairly new with jQuery, and am looking for a critique of my code. I am not entirely happy with a few things I have done. 1. Using an id to uniquely identify the buttons, and appending the "_dialog" string to it, so I can target the blocks of code i want to make visible. Seems a bit brittle, but I can't think of a better way. 2. The duplication when binding the hide functions. 3. General feeling that the code is not very modular/clean. I just want to know how I can improve my jQuery coding. Thanks
Еditor for writing jQuery
I found only Netbean. But it have many functions wich are not front-end development oriented. Does anyone know other, or plugin for any popular editor.
Moving pictures, but not a slider
We're trying to create an effect similar to what's on the www.viacom.com home page, which shows images parading across the screen. Any idea how to accomplish this in jQuery? We don't need any of the effects that occur after one of those panels is clicked on, just the scrolling/sliding effect. Once we get it figured out, we'll probably populate it with four to five images.
Making a multipage menu
I'm not sure if I'm calling it the right thing, but it is basically an image menu which lets you select images to display in a gallery and there are only a certain number of images visible per page and you use back and forward buttons to swap pages. I created a PHP gallery for my friend but my only problem is that I can't get the menu to work just the way I wanted. Luckily I have an example to show you guys. We are currently using simpleviewer but I want to make something that is easier for my friend
Assigning div width not working in IE?
I'm just starting to learn about jQuery and had a question about assigning a page width. The work in progress website is here: http://leighmcd.com/blog/ The website is a horizontal scroll, the content on each page is dynamic in width so I'm trying to get the total and assign that to the .main class (which wraps all of the content). $(document).ready(function(){ var contentWidth = $(".contentblock").width(); var strNoDivs2 = $('.contentblock').length; blockContentTotal = contentWidth * strNoDivs2;
how i can add several column in the menu
I all, I'm started jquery, i try add several collumn in the drop menu this is my test http://keo.n.free.fr/cour.html help me form add collum no juste 1 column. I dont't know how i can do it If you have a idea thanks for reply me :)
Problem : append(), load correctly elements but automatically scroll at the top of the webpage
Hi, I have a problem using the append() function of jquery : I have made a webpage which display 10 photographies, at the bottom of the page there is a link for loading 10 more photographies, this work well, all the elements are correctly loaded via an ajax request, but the problem is that the webpage automatically scroll at the top instead of staying at the same position i have no idea of how i can result this problem...
Next Page