Search Results

Search found 2177 results on 88 pages for 'children'.

Page 3/88 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Simple jQuery Toggle of children

    - by Rick
    Um, why no worky? Trying to toggle a ul with this: $("#others").children(".btn").click(function(){ if ($(this).children("ul").is(":hidden")) { $(this).children("ul").slideDown(); } else { $(this).children("ul").slideUp(); } }); And: <div id="other"> <div id="galleries"> <a href="#" class="btn">Galleries >> </a> <ul id="select_gallery"> ... </ul> </div> <div id="events"> <a href="#" class="btn">Events >> </a> <ul id="select_event"> ... </ul> </div> </div>

    Read the article

  • Iterating Through N Level Children

    - by bobber205
    This seems like something neat that might be "built into" jQuery but I think it's still worth asking. I have a problem where that can easily be solved by iterating through all the children of a element. I've recently discovered I need to account for the cases where I would need to do a level or two deeper than the "1 level" (just calling .children() once) I am currently doing. jQuery.each(divToLookAt.children(), function(index, element) { //do stuff } ); This is what I'm current doing. To go a second layer deep, I run another loop after doing stuff code for each element. jQuery.each(divToLookAt.children(), function(index, element) { //do stuff jQuery.each(jQuery(element).children(), function(indexLevelTwo, elementLevelTwo) { //do stuff } ); } ); If I want to go yet another level deep, I have to do this all over again. This is clearly not good. I'd love to declare a "level" variable and then have it all take care of. Anyone have any ideas for a clean efficient jQueryish solution? Thanks!

    Read the article

  • Close current UserControl

    - by BlueMan
    I have a Window1.xaml main Window and after same event I display a UserControl EditFile.xaml The code behind is: public static int whichSelected = -1; private void button1_Click(object sender, RoutedEventArgs e) { //searchEditPanel.Children.Clear(); whichSelected = listViewFiles.SelectedIndex; searchEditPanel.Children.Add(_EditFileControle); //this is Grid } And now, how to close the opened/added UserControl from it content by clicking Cancel button or something like that.

    Read the article

  • Dojo StackContainer children are not resizing on browser maximise/restore

    - by Andy
    Hi. I have the following nested layout in a dojo 1.4 app: BorderContainer 1 -- Stack Container 1 ----BorderContainer 2 ----BorderContainer 3 The StackContainer is sized with width and height 100%. When I resize the browser window using maximise/restore, the StackContainer correctly resizes to the center region of it's parent BorderContainer. The problem I have is that the StackContainer children (BorderContainer 2 and 3) do not get resized to the StackContainer's contentBox. Is there something special you have to do to force a resize of StackContainer children? I have tried calling StackContainer1.resize() but this makes no difference. Thanks in advance. Additional information: Thanks for the reply peller. The widget hierachy that contains the StackContainer is actually a custom widget, so the StackContainer is not actually in a BorderContainer directly, but has its height and width explicitly set to 100%. This works and the StackContainer is resized correctly on browser maximise. The direct children of the stackcontainer are BorderContainers and it is these BorderContainers that do not get resized when the StackContainer is resized. One point to note is that when the StackContainer is created in markup, the stackcontainer children are empty divs. These divs are then used as placeholders for custom widget creation, e.g. var widget = new com.company.widget(params, placeholderDiv); where placeholderDiv is a direct child of the StackContainer in markup. Should I be adding the programatically created 'widget' to the stackcontainer using addChild instead?

    Read the article

  • Parsing HTML: Call to a member function > children() on a non-object

    - by sm56d
    Hello all, I was just helped with this question but I can't get it to move to the next block of HTML. $html = file_get_html('http://music.banadir24.com/singer/aasha_abdoo/247.html'); $urls = $html->find('table[width=100%] table tr'); foreach($urls as $url){ $song_name = $url->children(2)->plaintext; $url = $url->children(6)->children(0)->href; } It returns the list of the names of the first album (Deesco) but it does not continue to the next album (The Best Of Aasha)? It just gives me this error: Notice: Trying to get property of non-object in C:\wamp\www\test3.php on line 26 Fatal error: Call to a member function children() on a non-object in C:\wamp\www\test3.php on line 28 Why is this and how can I get it to continue to the next table element? I appreciate any help on this! Please note: This is legal as the songs are not bound by copyright and they are available to download freely, its just I need to download a lot of them and I can't sit there clicking a button all day. Having said that, its taken me an hour to get this far.

    Read the article

  • nHibernate storage of an object with self referencing many children and many parents

    - by AdamC
    I have an object called MyItem that references children in the same item. How do I set up an nhibernate mapping file to store this item. public class MyItem { public virtual string Id {get;set;} public virtual string Name {get;set;} public virtual string Version {get;set;} public virtual IList<MyItem> Children {get;set;} } So roughly the hbm.xml would be: <class name="MyItem" table="tb_myitem"> <id name="Id" column="id" type="String" length="32"> <generator class="uuid.hex" /> </id> <property name="Name" column="name" /> <property name="Version" column="version" /> <bag name="Children" cascade="all-delete-orphan" lazy="false"> <key column="children_id" /> <one-to-many class="MyItem" not-found="ignore"/> </bag> </class> This wouldn't work I don't think. Perhaps I need to create another class, say MyItemChildren and use that as the Children member and then do the mapping in that class? This would mean having two tables. One table holds the MyItem and the other table holds references from my item. NOTE: A child item could have many parents.

    Read the article

  • Python-daemon doesn't kill its kids

    - by Brian M. Hunt
    When using python-daemon, I'm creating subprocesses likeso: import multiprocessing class Worker(multiprocessing.Process): def __init__(self, queue): self.queue = queue # we wait for things from this in Worker.run() ... q = multiprocessing.Queue() with daemon.DaemonContext(): for i in xrange(3): Worker(q) while True: # let the Workers do their thing q.put(_something_we_wait_for()) When I kill the parent daemonic process (i.e. not a Worker) with a Ctrl-C or SIGTERM, etc., the children don't die. How does one kill the kids? My first thought is to use atexit to kill all the workers, likeso: with daemon.DaemonContext(): workers = list() for i in xrange(3): workers.append(Worker(q)) @atexit.register def kill_the_children(): for w in workers: w.terminate() while True: # let the Workers do their thing q.put(_something_we_wait_for()) However, the children of daemons are tricky things to handle, and I'd be obliged for thoughts and input on how this ought to be done. Thank you.

    Read the article

  • Android - LinearLayout Horizontal with wrapping children

    - by kape123
    Is there a property to set for Android's LinearLayout that will enable it to properly wrap child controls? Meaning - I have changeable number of children and would like to lay out them horizontally like: Example: Control1, Control2, Control3, ... I do that by setting: ll.setOrientation(LinearLayout.HORIZONTAL); foreach (Child c in children) ll.addView(c); However, if I have large number of children, last one gets cuts off, instead of going to next line. Any idea how this can be fixed?

    Read the article

  • Using JQuery to get text of a div that's a child of a header to replace a different header

    - by Stevie Jenowski
    Hello all, I'm trying to get the text contents of a .div('.child#') child of my event.target('h6.class'), and replace my other headers('h1.replacHeader#') using this script below... $('h6.class').click(function(event) { var $target = $(event.target); $('.replaceHeader1').replaceWith("<h1 class='replaceHeader1'>" + $target.children(".child1").text() + "</h1>"); $('.replaceHeader2').replaceWith("<h1 class='replaceHeader2'>" + $target.children(".child2").text() + "</h1>"); }); }); I've noticed that .text() apparently doesn't apply to an event.target... So how could I go about achieving this?

    Read the article

  • jQuery: manipulating through children to check the checkbox in a table row

    - by gsquare567
    $("tr.clickable").each(function() {$(this).click(function() { $(this).children("td:first > input").is(":checked") ? $(this).children("td:first > input").removeAttr("checked") : $(this).children("td:first > input").attr("checked","checked"); })}); this only checks the first row in my table (no matter which row i click on). how can i apply it so that it checks the input on the specific row i click on? thanks! HTML: <tr id="row0" class="alternate clickable"> <td><img width="11" height="11" title="This email failed to send." alt="Failed" src="images/error_warning.png"><br> <input type="checkbox" value="6751" name="emailCheck[]" class="emailCheck"> </td>...

    Read the article

  • Updating cached counts in MySQL

    - by phleet
    In order to fix a bug, I have to iterate over all the rows in a table, updating a cached count of children to what its real value should be. The structure of the things in the table form a tree. In rails, the following does what I want: Thing.all.each do |th| Thing.connection.update( " UPDATE #{Thing.quoted_table_name} SET children_count = #{th.children.count} WHERE id = #{th.id} " ) end Is there any way of doing this in a single MySQL query? Alternatively, is there any way of doing this in multiple queries, but in pure MySQL? I want something like UPDATE table_name SET children_count = ( SELECT COUNT(*) FROM table_name AS tbl WHERE tbl.parent_id = table_name.id ) except the above doesn't work (I understand why it doesn't).

    Read the article

  • .htaccess redirect for www in parent folder and children react

    - by ServerChecker
    We were having a problem with the Norton seal not showing up on our affiliate marketing landing pages (landers). Turns out, the Norton seal was super picky about the "www." prefix. I had folder paths like /lp/cmpx where x was a number 1-100 and indicated advertising campaign number. So, to remedy this, I stuck this in my .htaccess file right after the RewriteEngine On line: RewriteCond %{HTTP_HOST} ^example\.com RewriteRule ^(.*)$ http://www.example.com/lp/cmp1/$1 [R=302,QSA,NC,L] Trouble is, I had to do that under every campaign folder, changing cmp1 to whatever the folder name was. Therefore, my question is... Is there a way I can do this with an .htaccess file under the parent folder (/lp in this case) and it will work for each of the children? EDIT: Note that I stuck an .htaccess file in /lp just now to test: RewriteEngine On RewriteCond %{HTTP_HOST} ^example\.com RewriteRule ^(.*)$ http://www.example.com/lp/$1 [R=302,QSA,NC,L] This yielded no effect to the /lp/cmpx folders underneath, to my dismay.

    Read the article

  • RIA Services query: Nested "from" and include children

    - by Stéphane Bebrone
    Hi guys, I have the following schema. What I'd like to do is to retrieve all customers (and children properties) from a selected StaffAssignment by StaffId. So I've written the following query: from c in ObjectContext.Customers.Include("Assignments.Activities") from a in c.Assignments from sa in a.StaffAssignments where sa.StaffId == staffId select c But children properties aren't loaded (I added the [Include] in service metadata file as well). What did I do wrong? Gtz, Stéphane.

    Read the article

  • How do I display children in succession, as3

    - by VideoDnd
    How do I display children in succession? By succession I mean 1,2,3,4, etc. Perhapse incrementing with a loop or using a timer is what I'm after. Add, remove, appear, or disappear children, could all work. I want a simple way to display 1 child every second until I reach 10. METHODS TRYED addChild and removeChild visible !visible for loop

    Read the article

  • Git dirctet acyclic graph - children know their parents but not the other way around

    - by dayscott
    Git is implemented as a directed acyclic graph. Children know their parents but not the other way round. This makes sense because i can reach every commit only through a branch or a tag ( generally speaking through a reference). That's how i traverse the tree. What other reasons had the developers of Git to make "the children know their parents but not the other way around"?/ What are the key benefits of this?

    Read the article

  • How to disable a container and its children in Swing

    - by Fuzzy76
    I cannot figure out a way to disable a container AND its children in Swing. Is Swing really missing this basic feature? If I do setEnabled(false) on a container, its children are still enabled. My GUI structure is pretty complex, and doing a traversion of all elements below the container is not an option. Neither is a GlassPane on top of the container (the container is not the entire window).

    Read the article

  • Getting a list of all children of a given commit

    - by intuited
    I'd like to run git filter-branch on all children of a given commit. This doesn't seem to be an easy task, since there doesn't appear to be a way to tell git rev-list to only return children of a particular commit. Using the .. syntax won't work because it will also include the parent commits of any merge within that range. Am I missing something here?

    Read the article

  • NHibernate save / update event listeners: listening for child object saves

    - by James Allen
    I have an Area object which has many SubArea children: public class Area { ... public virtual IList<SubArea> SubAreas { get; set; } } he children are mapped as a uni-directional non-inverse relationship: public class AreaMapping : ClassMap<Area> { public AreaMapping() { HasMany(x => x. SubAreas).Not.Inverse().Cascade.AllDeleteOrphan(); } } The Area is my aggregate root. When I save an area (e.g. Session.Save(area) ), the area gets saved and the child SubAreas automatically cascaded. I want to add a save or update event listener to catch whenever my areas and/or subareas are persisted. Say for example I have an area, which has 5 SubAreas. If I hook into SaveEventListeners: Configuration.EventListeners.SaveEventListeners = new ISaveOrUpdateEventListener[] { mylistener }; When I save the area, Mylistener is only fired once only for area (SubAreas are ignored). I want the 5 SubAreas to be caught aswell in the event listener. If I hook into SaveOrUpdateEventListeners instead: Configuration.EventListeners.SaveOrUpdateEventListeners = new ISaveOrUpdateEventListener[] { mylistener }; When I save the area, Mylistener is not fired at all. Strangely, if I hook into SaveEventListeners and SaveOrUpdateEventListeners: Configuration.EventListeners.SaveEventListeners = new ISaveOrUpdateEventListener[] { mylistener }; Configuration.EventListeners.SaveOrUpdateEventListeners = new ISaveOrUpdateEventListener[] { mylistener }; When I save the area, Mylistener is fired 11 times: once for the area, and twice for each SubArea! (I think because NHIbernate is INSERTing the SubArea and then UPDATING with the area foreign key). Does anyone know what I'm doing wrong here, and how I can get the listener to fire once for each area and subarea?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >