Search Results

Search found 7 results on 1 pages for 'thinkswan'.

Page 1/1 | 1 

  • How do I load new pages into my current jQuery colorbox?

    - by thinkswan
    I'm having a bit of trouble loading pages into an already-existing colorbox. I have a colorbox opened by clicked a link that is bound by the following code: $("a.ajaxAddPage").colorbox({ onComplete: function(){ $('ul#addPage li a').click(function() { $.fn.colorbox({href: $(this).attr('href')}); return false; }); } }); The following HTML is loaded into that colorbox via AJAX: <div class='colorboxWindow'> <ul id='addPage'> <li><a href='addCat.php'>Add Category</a></li> <li><a href='addPage.php' class='current'>Add New Page</a></li> <li><a href='addPage2.php'>Add Another Page</a></li> </ul> <h3>Add New Page...</h3> </div> I'm trying to have each of those 3 links open in the current colorbox when they are clicked. With my onComplete binding above, this works for the first click, but the next click just opens like a normal page. If I add another onComplete to the $.fn.colorbox() call in the above code, then the 2nd click will also load in the same colorbox, but the 3rd will not. Is there a way to just bind all future clicks to open in the same colorbox? I don't know much about event binding yet. If you need clarification, please ask.

    Read the article

  • Image cropping in PHP is producing blank result

    - by thinkswan
    I'm simply trying to crop a JPEG image (no scaling) using PHP. Here is my function, along with the inputs. function cropPicture($imageLoc, $width, $height, $x1, $y1) { $newImage = imagecreatetruecolor($width, $height); $source = imagecreatefromjpeg($imageLoc); imagecopyresampled($newImage,$source,0,0,$x1,$y1,$width,$height,$width,$height); imagejpeg($newImage,$imageLoc,90); } When I call it as follows--cropPicture('image.jpg', 300, 300, 0, 0)--the function completes properly, but I'm left with a black image that is 300x300 px (in other words, a blank canvas). Am I passing in the wrong arguments? The image exists and is writeable.

    Read the article

  • How to select text, but not images, in CSS

    - by thinkswan
    Simple question: I have the following markup... <a href='#'> <img src='icon.png'> This is the link </a> I want to have the text become underlined on mouseover. What is the CSS selector for selecting only the text in that <a> element and nothing else? I'd rather not wrap it in anything if I don't have to. a:hover { text-decoration: none; } a:hover <select_text_here> { text-decoration: underline; }

    Read the article

  • Binding elements when modal window loads from AJAX (jQuery)

    - by thinkswan
    I'd like to set up a drag'n'drop list inside a modal window. The window's content is loaded via an AJAX call, so I believe I need to use jQuery's .live() method. Here is my current code: $('#cboxLoadedContent').live('load', function() { // Event for sortable page lists $('ul#pageList').sortable(); }); How can I set up bindings when the modal window loads? The modal window comes from the colorbox plugin. Note: I'm guessing that 'load' is not the right event to use, because if I throw a simple alert() in there, it doesn't even show up when the window loads.

    Read the article

  • What is a robust jQuery Rich Text Editor with image upload capabilities?

    - by thinkswan
    I know this question has been asked countless times, but answers are mixed, so I thought I'd test the waters and see what the latest verdict is out in the development community. I need a [preferably jQuery] rich text editor plugin that simply attaches itself to <textarea> elements and supports image uploads. It doesn't need to be too advanced. Just alignment, bold, italic, styles and image support. I tried CKEditor (along with CKFinder for image uploads), but it just has too many features and is too heavy for what I need. This is going to be used for simple webpage editing.

    Read the article

  • How do I make a PHP call whenever a form element is clicked?

    - by thinkswan
    I have a jQuery colorbox opened over top of my webpage (with a <select> drop down list) and I'd like to make an AJAX call every time a new <option> is selected from the drop down. I have the following code, but it's not picking up the select event. $('#cboxLoadedContent select[name=parent]').live('select', function() { $.get("edit.php", { fn: 'getFormatLevel', parent: $('select[name=parent]').val() }, function(data) { alert("Data Loaded: " + data); }); }); Any ideas why this isn't even recognizing my selector?

    Read the article

  • How do I append to the end of the comments array in WordPress?

    - by thinkswan
    I'm trying to include something at the end of the comments array for a WordPress plugin. I currently have add_filter('comments_array', 'my_function'), where my_function($comments='') is something along the lines of: my_function($comments='') { echo 'something'; return $comments; } I obviously can't return the comments first, and echoing them doesn't work because $comments is a multi-dimensional array. Is there some way I can print the WordPress comments and then append something to them? Thanks.

    Read the article

1