jquery

Dynamically loading a JavaScript file is different if I use appendChild() or jQuery.append()

I am trying to dynamically load a JavaScript file by adding a script element to the head element, after which I test for the presence of a function defined inside that file to check that the load succeeded. If I use this code: var scriptElem = document.createElement("script"); scriptElem.type = "text/javascript"; scriptElem.src = 'myfi...

JQuery .Parent()

Ok here is my HTML (One row of about 20) <tr class="post-unauth message-unread"> <td> <input class="check-read" type="checkbox" checked="checked" value="68"/> </td> <td class="message-description" title="Post Title"> </td> <td class="message-author">Name</td> <td class="message-dates">3 hours ago</td> <td class="messag...

Conditionally adding a <br> to text within a <p> tag using jQuery

I have HTML code like this: <div id="paragraph"> <pre> <p>First Line in the paragraph , this goes very long and very very long</p> <p>This line is of normal size </pre> </div> Now, because of the first line, I get a scroll bar in my dialog box. I want to use jQuery and break the text inside the all <p> tag inside the "paragraph" div i...

Lightbox + Mediabox + Ajaxed Wordpress problem

Hey everyone, first time poster here. Check out www.dominicmancuso.com - the mediabox isn't loading though I've called Mediabox.init(). I know it runs on mootools so I'm wondering what the problem is in IE, as it works in FireFox. I can definitely pay you a nice gratuity for your work if you manage to find out what's going on... :D C...

JQuery TableSorter with Pager and LightWindow problem

Hi 2ALL... I've a tablesorter with attached pager plugin on my page with links 'Details' in the one of the cell. Links have a class='lightwindow' and after clicking is rising up a LightWindow script with a window. So it work's vell on the First Page .. when i click Next Page on SortTable.Pager and clickin on my link 'Details' it's doesn...

Jquery - Append to ID

Do to an IE6 bug I need to alter some Jquery, I want to take an element called #nav, append to the ID. I already use addClass to create <div id="#nav" class="test"> $('span .breadcrumb').each(function(){ $('#Nav').addClass($(this).text()); Which takes the breadcrumb navigation text and adds it as a new class to the Can i use ....

Dynamic Treeview PHP

Hello, I want to make a dynamic populated treeview from mysql database in PHP. I have searched a lot for that, but i haven't got the solution yet (jquery treeview seems not working in my context). And i want to realize is that i extend the treeview by clicking the "+" sign. When i click the item of the treeview, it will execute a que...

Simple AJAX query in chrome/safari providing not-so-simple debugging situation.

Hi, I have a very simple jQuery/ajax script for a membership driven website. The script just checks to see if the user entered info, validates it against my database and returns 1 for a failed login attempt, and 0 if the username/password match. The function works perfectly when I run it w/o calling it from ajax. Firefox: everythin...

jquery how do i execute this code and make it display in a div

what i an trying to do is use jquery and a ul menu and on click it loads section divs from an external file and displays them in a content div and in thos section div i need this code to display it's results <script type='text/javascript'> imvu_avatar_name = "TheDarkRaver"; imvu_panel_name = "rankings_panel"; imvu_section_name = "mp_ri...

JQuery: Having trouble properly displaying table

Hello! Recently I've been working on a web application that is using JQuery to parse the JSON and display it in the HTML view. I cannot figure out why the table the following code outputs ends the tag immediately after the first .append method. $("document").ready(function() { $.getJSON("http://localhost:1909/encoders", function(d...

jQuery 1.4 - ui Tabstrip with AJAX

So I have elected to play with jQuery 1.4 - and I am noticing something right off. This is not a real project ,so the code here should be taken with a grain of salt. I wrote it to reproduce the error. Essentially, try to follow the jQuery UI Tabstrip AJAX loading example - you will get awkward results. For instance, the tabs link as ......

Make it easier to call a custom jQuery plugin

I have written a plugin with the following "signature": jQuery.fn.attach = function(element, settings, duration, options, callback) { Here element is a jQuery object, settings are my custom settings for my plugin and duration, options and callback are all parameters that I use in jQuery's animate, like this: someObject.animate({ some...

jQuery/JS, removing/trimming trailing html line breaks?

I'm looking for some ideas for the most efficient way to remove trailing html <br/> tags using javascript or jquery. RULES: The br, at the front and end must be removed. It must remove non-closing and self-closing br tags. All br within the textual content must remain untouched. THE HTML: <div class="generatedContent...

Jquery Flyout Menu

Hi, I have an unordered list with anchors living in a widget. This widget can be placed anywhere on the screen by the user. A user should click on an li a element and a hidden div should appear. My script generally handles a fixed position which can be an problem if the user moves this width to another location on the screen. I'm se...

JCarousel Newbie question

Ok here is the situation: I am using the basic example for jcarousel (Carousel with dynamic content loading via Ajax from a PHP script) as a basis: function mycarousel_itemLoadCallback(carousel, state) { // Check if the requested items already exist if (carousel.has(carousel.first, carousel.last)) { return; } ...

How do I pass the # symbol as part of a GET querystring in the URL?

I am using javascript (using jquery) to pass a # symbol as a GET parameter via AJAX call. The problem right now is that the # symbol is breaking up my querystring. Any help appreciated. Thanks! ...

Javascript: JSON 'for loop'

The following Javascript displays in Safari but not Mobile Safari. Can anyone see any bugs? $("#results").append(data); var songdata = JSON.parse(data); var i = 0; for (i=0;i<=songdata.total;i++) { alert(i); var songhtml = "<ul><li><img src=\"" + songdata.data[i].artwork + "\" /></li><li>" + songdata.data[i].title + "</li><li...

Jquery li element id

Hi, I am using a jquery contextmenu plugin for right click menus which I am trying to add to each li element of an unordered list with the ID mailbox. The code I have is: $("#mailbox > li").contextMenu('myMenu1', { bindings: { 'open': function(t) { alert('Trigger was '+t.id+'\nAction was Open'); } //CODE SN...

jquery populate select box with key:value pair?

I am using jquery to the server code returns the following values 0:SELECT ONE;1:VALUE1;2:VALUE2 etc how do i populate this into a select box? var="0:SELECT ONE;1:VALUE1;2:VALUE2"; $("#targetSelectBox"). ??????? ...

TableSorter 2.0 Plugin - Enable Table scroll

I am using the Tablesorter plugin and it works great. Currently, I achieve table scrolling using a div wrapper. Is it possible to make the table scroll, keeping the headers visible while scrolling and not using any divs? ...