I have three different types of checkboxes and I am disturbing to toggle them, but all the checkboxes Toggling I just want to toggle the selected element.
My code is as follows: CSS ==== Oter-box {background: none repeat scroll 0 0 # ea5700; Padding: 1px; Width: 55px; Height: 23px; Box-Shadow: 2px 1px 2px # 888888; } .poly-box {Infection: All .2s ease-in-out; Background: Any repeatable scrolls 0 0 # DDDDDD; Width: 15px; Height: 20px; Margin-right: -2px; Margin-left: 0 pixels; Display area; Correct: -32 pixels; Padding: 4px 5px 3px 3px; Status: Relative; Border: None; Border-radius: 2px; Box-Shadow: 2px 2px 2px # 888888; } # Right box Winner-box {LEFT: 37px; Top: 0; } .txt {padding: 2px; / * Font-family: 'robot slab', serif; * / Font-weight: bold; font size:; White color; } # Right box .txt {float: left; } #left-box Winner-box {top: 0; Left: 0 pixels; } #left box .txt {float: right; } JS === $ (function () ($ ('. $' External box '$' ('.txt'). $ ('.txt'). CSS ('color', 'gray'); $ ('. External-CSS ('background', '# e2e2e2');} and if (value === 'left-box'); $ ('. External box' ('.') ($ '.txt'). $ '('. '); $ (' Color ',' white '); $ (' external box '). Attr (' Id ',' right-box '); $ (' Css ('background', '# ea5700');}}); Here is my html code in which I created three div elements
html ==== div class =" txt " Style = "display: inline;" & gt; yes & lt; / div & gt; & lt; div class = "inner-box" & gt; & lt; / div & gt; & lt; div / div & gt; ; Div class = "external-box" id = "right-box">
Here if I am transferring all instead of selecting any checkbox, I want to toggle the current object which is clicked I have also used the 'this' keyword. But in vain
To target .txt elements with proper reference Required: Click $ (' External box ') (function () {var value = this.id, $ txt = $ (this) .find (' .txt '); if ( Value === 'right bock C ') {$ txt.text (' NO '). CSS (' color ',' gray '), $ (this) .attr (' id ',' left-box '); $ (this). 'Background', '# E2A2E2');} and if (value === 'left box') {$ txt.text ('yes'). CSS ('color', 'white'); $ (This) .attr ('id', 'right-box'); $ (this) .css ('background', '# ea5700');}}); Click the related .txt element within the handler, only $ (this) .find ('.txt') and is currently clicked .auer- Box with $ (this) . Also keep in mind that you have repeated the ID in HTML, for example instead of using classes it should be corrected instead.
Demo:
Popular posts from this blog
I have a little code here. Could you please tell me what this code really does? please. Here in the AJAX call: $ .ajax ({url: "{% url} upload_document '%}", type: "POST", data : {Csrfmiddletoken: document.getElementsByName ('csrfmiddletoken') [0] Price, Title: document.getElementById ('title'). Value, // document: document: document.getElementById ('document'),}, datatype: "Jason", success: function (feedback) {if (feedback == "true") {// success} other {// attachment errors}}}); How AJAX works in the Django and how we can see the AJAX request. Here is the idea of my thoughts def upload_document (requested): Print request. POTT print request FILES if request.is_ajax (): If request.method == 'POST': form = UploadForm (request.POST, request.FILES, user = request.user) if form.is_valid (): Form.save () return HTTPPCS (SimpleJason Dumps ('True'), Mime Type = 'App / Jason') Other:...
I have 31 topics (S1, S2, S3, S4, etc.) 3 images in each topic, opposite 1 IMG, Contrast 2 IMG and Contrast 3 Are IMG I p In a NX1 cell named P, I would like to use a loop to get all the paths of contrasts from all the subjects: data / S1 / contrast1.img / S1 / contrast2.img data / S1 / contrast3.img data / s2 / contrast1.img data / S2 / contrast2.img Data / S2 / contrast3.img ... Data / S31 / contast3.img This is what I've tried: A = {'S1', 'S2', 'S3', ..., 'S31'}; % All topics C = {'contrast1.img', 'contrast2.img', 'contrast3.img'}; For each = P = cell (31 * 3,1) for each topic, the required contrast images: Length = A for Jammu = 1: Length (C) P {j} = spm_select ('FPList', Fullfile (data_path, q {i}) sprint ('% s', cell2mat (c))); % Of each topic is to select three contrast images, it works in my script, it is probably not 100% correct, because I had to simplify this example. End of ...
I am constantly trying to use recurrent neural networks to classify a series of data. To be more specific, I have a sequence of sensor reading (which is continuous over time), I have to learn an algorithm which can detect the state related to this pattern, given the readings change. Example: Time step_1: 1.4 Time step_2: 1 Time step_3: 0.8 State = New Sequence: Time Phase 1: 0.4 Time Phase 2: 0.3 Time Phase 3: 0.1 State = Sitting I actually have 12 censors, I'm just showing a sequence of numbers for convenience. (Numbers are not real, I'm just trying to fulfill this idea)! I am trying to make my network with PyBrain RNN, however, I can not get a Data Set Container that can detect it, like information I tried to use sequential data But after some testing I came to know that this number is the next element in the sequence of numbers. Here's how I prepare my dataset: self.alldata = SequentialDataSet (ds.num_features, 1) # Now add samples to the dat...
Comments
Post a Comment